Storm Trading System This script is inspired by the following :
Fractal Dow RSI Support and Resistance ;
Moving Average Clouds ;
Let's start.
This command is based on a fun description of where we are.
Technical analysis methods are likened to a storm.
Clouds as moving average,risk factor as lightning,
fractals were taken as green and red rain.
In this system:
4 Exponential Moving Averages, ( EMA15, EMA30 , EMA45 , EMA60 ),
interpretation of my own work, Dow Factor RSI, as Fractal Support and Resistance,
interpretation of my own work , DVOG Risk Factor : with changeable background and bar color.
Fractal support resistance level codes do not belong to me.
So I'm not putting a license.
But the other codes are my labor.
Consider the risk factor not as a stop, but as a region of high attention.
It is a warning before hard movements.
And watch out for turbulence in the clouds :)
The regions above and below the clouds are major trend zones, which may take a long time.
Guide the fractals in these areas.
It allows you to comment on this and tons of similar things.
And you see where you are in the big trade from a different perspective.
Repaint issue :
Firstly our source is close . Repaint will only cause the following issue and solution:
There may be a time difference between countries as the dow factor depends on the indexes.
Do not use a low graph time frame in stocks.
在脚本中搜索"support resistance"
Volume Profile Free Pro (25 Levels Value Area VWAP) by RRBVolume Profile Free Pro by RagingRocketBull 2019
Version 1.0
All available Volume Profile Free Pro versions are listed below (They are very similar and I don't want to publish them as separate indicators):
ver 1.0: style columns implementation
ver 2.0: style histogram implementation
ver 3.0: style line implementation
This indicator calculates Volume Profile for a given range and shows it as a histogram consisting of 25 horizontal bars.
It can also show Point of Control (POC), Developing POC, Value Area/VWAP StdDev High/Low as dynamically moving levels.
Free accounts can't access Standard TradingView Volume Profile, hence this indicator.
There are 3 basic methods to calculate the Value Area for a session.
- original method developed by Steidlmayr (calculated around POC)
- classical method using StdDev (calculated around the mean VWAP)
- another method based on the mean absolute deviation (calculated around the median)
POC is a high volume node and can be used as support/resistance. But when far from the day's average price it may not be as good a trend filter as the other methods.
The 80% Rule: When the market opens above/below the Value Area and then returns/stays back inside for 2 consecutive 30min periods it has 80% chance of filling VA (like a gap).
There are several versions: Free, Free Pro, Free MAX. This is the Free Pro version. The Differences are listed below:
- Free: 30 levels, Buy/Sell/Total Volume Profile views, POC
- Free Pro: 25 levels, +Developing POC, Value Area/VWAP High/Low Levels, Above/Below Area Dimming
- Free MAX: 50 levels, packed to the limit
Features:
- Volume Profile with up to 25 levels (3 implementations)
- POC, Developing POC Levels
- Buy/Sell/Total/Side by Side View modes
- Side Cover
- Value Area, VAH/VAL dynamic levels
- VWAP High/Low dynamic levels with Source, Length, StdDev as params
- Show/Hide all levels
- Dim Non Value Area Zones
- Custom Range with Highlighting
- 3 Anchor points for Volume Profile
- Flip Levels Horizontally
- Adjustable width, offset and spacing of levels
- Custom Color for POC/VA/VWAP levels and Transparency for buy/sell levels
Usage:
- specify max_level/min_level for a range (required in ver 1.0/2.0, auto/optional in ver 3.0 = set to highest/lowest)
- select range (start_bar, range length), confirm with range highlighting
- select mode Value Area or VWAP to show corresponding levels.
- flip/select anchor point to position the buy/sell levels, adjust width and spacing as needed
- select Buy/Sell/Total/Side by Side view mode
- use POC/Developing POC/VA/VWAP High/Low as S/R levels. Usually daily values from 1-3 days back are used as levels for the current day.
- Green - buy volume of a specific price level in a range, Red - sell volume. Green + Red = Total volume of a price level in a range
There's no native support for vertical histograms in Pinescript (with price axis as base)
Basically, there are 4 ways to plot a series of horizontal bars stacked on top of each other:
1. plotshape style labeldown (ver 0 prototype discarded)
- you can have a set of fixed width/height text labels consisting of a series of underscores and moving dynamically as levels. Level offset controls visible length.
- you can move levels and scale the base width of the volume profile histogram dynamically
- you can calculate the highest/lowest range values automatically. max_level/min_level inputs are optional
- you can't fill the gaps between levels/adjust/extend width, height - this results in a half baked volume profile and looks ugly
- fixed text level height doesn't adjust and looks bad on a log scale
- fixed font width also doesn't scale and can't be properly aligned with bars when zooming
2. plot style columns + hist_base (ver 1.0)
- you can plot long horizontal bars using a series of small adjacent vertical columns with level offsets controlling visible length.
- you can't hide/move levels of the volume profile histogram dynamically on each bar, they must be plotted at all times regardless - you can't delete the history of a plot.
- you can't scale the base width of the volume profile histogram dynamically, can't set show_last from input, must use a preset fixed width for each level
- hist_base can only be a static const expression, can't be assigned highest/lowest range values automatically - you have to specify max_level/min_level manually from input
- you can't control spacing between columns - there's an equalizer bar effect when you zoom in, and solid bars when you zoom out
- using hist_base for levels results in ugly load/redraw times - give it 3-5 sec to finalize its shape after each UI param change
- level top can be properly aligned with another level's bottom producing a clean good looking histogram
- columns are properly aligned with bars automatically
3. plot style histogram + hist_base (ver 2.0)
- you can plot long horizontal bars using a series of small vertical bars (horizontal histogram) instead of columns.
- you can control the width of each histogram bar comprising a level (spacing/horiz density). Large enough width will cause bar overlapping and give level a "solid" look regardless of zoom
- you can only set width <= 4 in UI Style - custom textbox input is provided for larger values. You can set width and plot transparency from input
- this method still uses hist_base and inherits other limitations of ver 2.0
4. plot style lines (ver 3.0)
- you can also plot long horizontal bars using lines with level offsets controlling visible length.
- lines don't need hist_base - fast and smooth redraw times
- you can calculate the highest/lowest range values automatically. max_level/min_level inputs are optional
- level top can't be properly aligned with another level's bottom and have a proper spacing because line width uses its own units and doesn't scale
- fixed line width of a level (vertical thickness) doesn't scale and looks bad on log (level overlapping)
- you can only set width <= 4 in UI Style, a custom textbox input is provided for larger values. You can set width and plot transparency from input
Notes:
- hist_base for levels results in ugly load/redraw times - give it 3-5 sec to finalize its shape after each UI param change
- indicator is slow on TFs with long history 10000+ bars
- Volume Profile/Value Area are calculated for a given range and updated on each bar. Each level has a fixed width. Offsets control visible level parts. Side Cover hides the invisible parts.
- Custom Color for POC/VA/VWAP levels - UI Style color/transparency can only change shape's color and doesn't affect textcolor, hence this additional option
- Custom Widh for levels - UI Style supports only width <= 4, hence this additional option
- POC is visible in both modes. In VWAP mode Developing POC becomes VWAP, VA High and Low => VWAP High and Low correspondingly to minimize the number of plot outputs
- You can't change buy/sell level colors (only plot transparency) - this requires 2x plot outputs exceeding max 64 limit. That's why 2 additional plots are used to dim the non Value Area zones
- Use Side by Side view to compare buy and sell volumes between each other: base width = max(total_buy_vol, total_sell_vol)
- All buy/sell volume lengths are calculated as % of a fixed base width = 100 bars (100%). You can't set show_last from input
- Sell Offset is calculated relative to Buy Offset to stack/extend sell on top of buy. Buy Offset = Zero - Buy Length. Sell Offset = Buy Offset - Sell Length = Zero - Buy Length - Sell Length
- If you see "loop too long error" - change some values in UI and it will recalculate - no need to refresh the chart
- There's no such thing as buy/sell volume, there's just volume, but for the purposes of the Volume Profile method, assume: bull candle = buy volume, bear candle = sell volume
- Volume Profile Range is limited to 5000 bars for free accounts
P.S. Cantaloupia Will be Free!
Links on Volume Profile and Value Area calculation and usage:
www.tradingview.com
stockcharts.com
onlinelibrary.wiley.com
Support & Resistance LevelsBasic Visualisation of key support and resistance levels.
This script works best on periods of 15minutes or greater.
The strength of the support/resistance are shown through line thickness, and support levels are shown as green and resistance levels red.
Indicator: Relative Volume Indicator & Freedom Of MovementRelative Volume Indicator
------------------------------
RVI is a support-resistance technical indicator developed by Melvin E. Dickover. Unlike many conventional support and resistance indicators, the Relative Volume Indicator takes into account price-volume behavior in order to detect the supply and demand pools. These pools are marked by "Defended Price Lines" (DPLs), also introduced by the author.
RVI is usually plotted as a histogram; its bars are highlighted (black, by default) when the volume is unusually large. According to the author, this happens if the indicator value exceeds 2.0, thus signifying that a possible DPL is present.
DPLs are horizontal lines that run across the chart at levels defined by following conditions:
* Overlapping bars: If the indicator spike (i.e., indicator is above 2.0 or a custom value)
corresponds to a price bar overlapping the previous one, the previous close can be used as the
DPL value.
* Very large bars: If the indicator spike corresponds to a price bar of a large size, use its
close price as the DPL value.
* Gapping bars: If the indicator spike corresponds to a price bar gapping from the previous bar,
the DPL value will depend on the gap size. Small gaps can be ignored: the author suggests using
the previous close as the DPL value. When the gap is big, the close of the latter bar is used
instead.
* Clustering spikes: If the indicator spikes come in clusters, use the extreme close or open
price of the bar corresponding to the last or next to last spike in cluster.
DPLs can be used as support and resistance levels. In order confirm and refine them, RVI is used along with the FreedomOfMovement indicator discussed next.
Freedom of Movement Indicator
------------------------------
FOM is a support-resistance technical indicator, also by Melvin E. Dickover. FOM is the ratio of relative effect (relative price change) to the relative effort (normalized volume), expressed in standard deviations. This value is plotted as a histogram; its bars are highlighted (black, by default( when this ratio is unusually high. These highlighted bars, or "spikes", define the positioning of the DPLs.
Suggestions for placing DPLs are the same as for the Relative Volume Indicator discussed above.
Note that clustering spikes provide the strongest DPLs while isolated spikes can be used to confirm and refine those provided by the Relative Volume Indicator. Coincidence of spikes of the two indicator can be considered a sign of greater strength of the DPL.
More info:
S&C magazine, April 2014.
I am still trying these on various instruments to understand the workings more. Don't forget to share what you learn -- any use cases / ideal scenarios / gotchas, would love to hear them all.
Advanced FVG Detector Pro📊 Advanced FVG Detector Pro - Smart Money Analysis Tool
Overview
The Advanced FVG Detector Pro is a sophisticated Pine Script v6 indicator designed to identify and track Fair Value Gaps (FVGs) with institutional-grade precision. This tool goes beyond basic gap detection by incorporating volume analysis, smart money scoring, and adaptive filtering to help traders identify high-probability trading opportunities.
What are Fair Value Gaps?
Fair Value Gaps (FVGs) are price inefficiencies that occur when the market moves so quickly that it leaves behind an imbalance or "gap" in price action. These gaps often act as magnets for future price movement as the market seeks to fill these inefficiencies. Professional traders and institutions closely monitor FVGs as they represent areas of potential support, resistance, and high-probability trade setups.
🎯 Key Features
1. Smart Money Scoring System
Proprietary algorithm that rates each FVG on a 0-100 scale Combines gap size, volume strength, price location, and trend alignment Filter out low-quality setups by setting minimum score thresholdsFocus on institutional-grade opportunities with scores above 70
2. Advanced Volume Validation
Validates FVGs with volume analysis to reduce false signals Only displays gaps formed during significant volume periods Customizable volume multiplier for different market conditions
Visual volume strength indicators on chart
3. Flexible Mitigation Options
Full Fill: Traditional complete gap closure Midpoint Touch: More aggressive entry strategy
Partial Fill: Customizable percentage-based mitigation (10-90%) Choose the strategy that matches your trading style
4. ATR-Based Adaptive Filtering
Automatically adjusts to market volatility using Average True Range Works consistently across any instrument, timeframe, or volatility regime No manual recalibration needed when switching markets Filters out noise while capturing meaningful gaps
5. Real-Time Statistics Dashboard
Live tracking of total active FVGs Bullish vs Bearish gap count Mitigation rate percentage
Average Smart Money Score Toggle on/off based on preference
6. Professional Visual Design
Clean, customizable color schemes Optional midline display for precise entry planning
Labels showing gap type, score, and volume strength Automatic extension of active gaps
Mitigated gaps change color for easy identification
📈 How to Use
For Day Traders:
Use 5-15 minute timeframes
Set ATR Multiplier to 0.15-0.25
Enable volume validation
Focus on FVGs with scores above 65
For Swing Traders:
Use 1H-4H timeframes
Set ATR Multiplier to 0.5-1.0
Use "Midpoint Touch" mitigation
Focus on FVGs with scores above 70
For Position Traders:
Use Daily timeframe
Set ATR Multiplier to 0.75-1.5
Use "Full Fill" mitigation
Focus on FVGs with scores above 75
🔧 Customization Options
Detection Settings:
Minimum FVG size percentage filter
ATR-based size filtering
Maximum number of gaps to display
Smart Money Score minimum threshold
Volume Analysis:
Volume validation toggle
Volume multiplier adjustment
Volume moving average period
Visual volume strength background
Mitigation Control:
Choose mitigation type (Full/Midpoint/Partial)
Set partial fill percentage
Auto-remove mitigated gaps
Control how long mitigated gaps remain visible
Visual Customization:
Bullish/Bearish/Mitigated colors
Show/hide midlines
Show/hide labels
Box extension length
Statistics dashboard toggle
🎓 Trading Strategy Ideas
1. FVG Retest Strategy
Wait for price to create a high-score FVG (70+)
Enter on the first retest of the gap
Place stop loss beyond the gap
Target the opposite side of the gap or next FVG
2. Confluence Trading
Combine FVGs with support/resistance levels
Look for FVGs near key moving averages (20/50 EMA)
Higher probability when FVG aligns with trendlines
Use multiple timeframe analysis
3. Breakout Confirmation
FVGs often form during strong breakouts
High-volume FVGs confirm breakout strength
Enter on mitigation of breakout FVG
Trail stops as new FVGs form in trend direction
⚡ Performance Optimizations
Efficient memory management for smooth chart performance
Optimized calculations run only once per bar
Smart array management prevents memory leaks
Works smoothly even with 100+ active FVGs
🔔 Alert System
Customizable alerts for new bullish FVGs
Customizable alerts for new bearish FVGs
Mitigation alerts for active gaps
Frequency control to avoid alert spam
💡 Pro Tips
Multi-Timeframe Approach: Identify major FVGs on higher timeframes (Daily/4H) and use lower timeframes (15M/5M) for precise entries
Volume Confirmation: The highest probability setups occur when FVGs form with 2x+ average volume
Trend Alignment: Trade FVGs in the direction of the major trend for best results
Patience Pays: Wait for price to return to the FVG rather than chasing breakouts
Risk Management: Always use stop losses beyond the FVG boundaries
📚 Educational Value
This indicator is perfect for:
Learning to identify institutional order flow
Understanding market microstructure
Developing price action trading skills
Recognizing supply and demand imbalances
Improving entry and exit timing
⚠️ Disclaimer
This indicator is a tool for technical analysis and should not be used as the sole basis for trading decisions. Always combine with proper risk management, fundamental analysis, and your own trading plan. Past performance does not guarantee future results.
🔄 Updates & Support
Regular updates will include:
Additional filtering options
Enhanced multi-timeframe analysis
More customization features
Performance improvements
📊 Best Pairs/Markets
Works excellently on:
Forex pairs (EUR/USD, GBP/USD, etc.)
Cryptocurrency (BTC, ETH, etc.)
Stock indices (SPX, NQ, etc.)
Individual stocks
Commodities (Gold, Oil, etc.)
Version Information
Version: 1.0
Pine Script: Version 6
Type: Overlay Indicator
Max Boxes: 500
Max Lines: 500
Fibonacci Degree System This Pine Script creates a sophisticated technical analysis tool that combines Fibonacci retracements with a degree-based cycle system. Here's a comprehensive breakdown:
Core Concept
The indicator maps price movements onto a 360-degree circular framework, treating market cycles like geometric angles. It creates a visual "mesh" where Fibonacci ratios intersect in both price (horizontal) and time (vertical) dimensions.
How It Works
1. Finding Reference Points
The script looks back over a specified period (default 100 bars) to identify:
Highest High: The peak price point
Lowest Low: The trough price point
Time Locations: Exactly which bars these extremes occurred on
These two points form the boundaries of your analysis window.
2. Creating the Fibonacci Grid
Horizontal Lines (Price Levels):
The script divides the price range between high and low into seven key Fibonacci ratios:
0% (Low) - Bottom boundary in red
23.6% - Minor retracement in orange
38.2% - Shallow retracement in yellow
50% - Midpoint in lime green
61.8% - Golden ratio in aqua (most significant)
78.6% - Deep retracement in blue
100% (High) - Top boundary in purple
Each line represents a potential support/resistance level where price might react.
Vertical Lines (Time Cycles):
The same Fibonacci ratios are applied to the time dimension between the high and low bars. If your high and low are 50 bars apart, vertical lines appear at:
Bar 0 (0%)
Bar 12 (23.6%)
Bar 19 (38.2%)
Bar 25 (50%)
Bar 31 (61.8%)
Bar 39 (78.6%)
Bar 50 (100%)
These suggest when price might make significant moves.
3. The Degree Mapping System
The innovative feature maps the time progression to degrees:
0° = Start point (0% time)
85° = 23.6% through the cycle
138° = 38.2% through the cycle
180° = Midpoint (50%)
222° = 61.8% through the cycle (golden angle)
283° = 78.6% through the cycle
360° = Complete cycle (100%)
This treats market movements as circular patterns, similar to how planets orbit or pendulums swing.
Visual Output
When you apply this indicator, you'll see:
A rectangular mesh extending beyond your high-low range (by 150% default)
Color-coded horizontal lines showing price Fibonacci levels
Matching vertical lines showing time Fibonacci intervals
Price labels on the right showing percentage levels
Degree labels at the bottom showing the angular position in the cycle
Intersection points creating a grid of potentially significant price-time coordinates
Trading Application
Traders use this to identify:
Support/Resistance Zones: Where horizontal and vertical lines intersect
Time Targets: When price might reverse (at vertical Fibonacci times)
Cycle Completion: When approaching 360°, a new cycle may begin
Harmonic Patterns: Geometric relationships between price and time
Customization Features
The script offers extensive control:
Lookback period: Adjust cycle length (10-500 bars)
Mesh extension: How far to project the grid forward
Visual toggles: Show/hide horizontal lines, vertical lines, labels
Styling: Line thickness, style (solid/dashed/dotted), colors
Label positioning: Fine-tune text placement for readability
The intersection at 61.8% time and 61.8% price at 222° becomes a key target zone.
This tool essentially converts the abstract concept of market cycles into a concrete, visual geometric framework that traders can analyze and act upon.
DISCLAIMER: This information is provided for educational purposes only and should not be considered financial, investment, or trading advice.
No guarantee of profits: Past performance and theoretical models do not guarantee future results. Trading and investing involve substantial risk of loss.
Not a recommendation: This script illustration does not constitute a recommendation to buy, sell, or hold any financial instrument.
Do your own research: Always conduct thorough independent research and consider consulting with a qualified financial advisor before making any trading decisions.
Dimensional Resonance ProtocolDimensional Resonance Protocol
🌀 CORE INNOVATION: PHASE SPACE RECONSTRUCTION & EMERGENCE DETECTION
The Dimensional Resonance Protocol represents a paradigm shift from traditional technical analysis to complexity science. Rather than measuring price levels or indicator crossovers, DRP reconstructs the hidden attractor governing market dynamics using Takens' embedding theorem, then detects emergence —the rare moments when multiple dimensions of market behavior spontaneously synchronize into coherent, predictable states.
The Complexity Hypothesis:
Markets are not simple oscillators or random walks—they are complex adaptive systems existing in high-dimensional phase space. Traditional indicators see only shadows (one-dimensional projections) of this higher-dimensional reality. DRP reconstructs the full phase space using time-delay embedding, revealing the true structure of market dynamics.
Takens' Embedding Theorem (1981):
A profound mathematical result from dynamical systems theory: Given a time series from a complex system, we can reconstruct its full phase space by creating delayed copies of the observation.
Mathematical Foundation:
From single observable x(t), create embedding vectors:
X(t) =
Where:
• d = Embedding dimension (default 5)
• τ = Time delay (default 3 bars)
• x(t) = Price or return at time t
Key Insight: If d ≥ 2D+1 (where D is the true attractor dimension), this embedding is topologically equivalent to the actual system dynamics. We've reconstructed the hidden attractor from a single price series.
Why This Matters:
Markets appear random in one dimension (price chart). But in reconstructed phase space, structure emerges—attractors, limit cycles, strange attractors. When we identify these structures, we can detect:
• Stable regions : Predictable behavior (trade opportunities)
• Chaotic regions : Unpredictable behavior (avoid trading)
• Critical transitions : Phase changes between regimes
Phase Space Magnitude Calculation:
phase_magnitude = sqrt(Σ ² for i = 0 to d-1)
This measures the "energy" or "momentum" of the market trajectory through phase space. High magnitude = strong directional move. Low magnitude = consolidation.
📊 RECURRENCE QUANTIFICATION ANALYSIS (RQA)
Once phase space is reconstructed, we analyze its recurrence structure —when does the system return near previous states?
Recurrence Plot Foundation:
A recurrence occurs when two phase space points are closer than threshold ε:
R(i,j) = 1 if ||X(i) - X(j)|| < ε, else 0
This creates a binary matrix showing when the system revisits similar states.
Key RQA Metrics:
1. Recurrence Rate (RR):
RR = (Number of recurrent points) / (Total possible pairs)
• RR near 0: System never repeats (highly stochastic)
• RR = 0.1-0.3: Moderate recurrence (tradeable patterns)
• RR > 0.5: System stuck in attractor (ranging market)
• RR near 1: System frozen (no dynamics)
Interpretation: Moderate recurrence is optimal —patterns exist but market isn't stuck.
2. Determinism (DET):
Measures what fraction of recurrences form diagonal structures in the recurrence plot. Diagonals indicate deterministic evolution (trajectory follows predictable paths).
DET = (Recurrence points on diagonals) / (Total recurrence points)
• DET < 0.3: Random dynamics
• DET = 0.3-0.7: Moderate determinism (patterns with noise)
• DET > 0.7: Strong determinism (technical patterns reliable)
Trading Implication: Signals are prioritized when DET > 0.3 (deterministic state) and RR is moderate (not stuck).
Threshold Selection (ε):
Default ε = 0.10 × std_dev means two states are "recurrent" if within 10% of a standard deviation. This is tight enough to require genuine similarity but loose enough to find patterns.
🔬 PERMUTATION ENTROPY: COMPLEXITY MEASUREMENT
Permutation entropy measures the complexity of a time series by analyzing the distribution of ordinal patterns.
Algorithm (Bandt & Pompe, 2002):
1. Take overlapping windows of length n (default n=4)
2. For each window, record the rank order pattern
Example: → pattern (ranks from lowest to highest)
3. Count frequency of each possible pattern
4. Calculate Shannon entropy of pattern distribution
Mathematical Formula:
H_perm = -Σ p(π) · ln(p(π))
Where π ranges over all n! possible permutations, p(π) is the probability of pattern π.
Normalized to :
H_norm = H_perm / ln(n!)
Interpretation:
• H < 0.3 : Very ordered, crystalline structure (strong trending)
• H = 0.3-0.5 : Ordered regime (tradeable with patterns)
• H = 0.5-0.7 : Moderate complexity (mixed conditions)
• H = 0.7-0.85 : Complex dynamics (challenging to trade)
• H > 0.85 : Maximum entropy (nearly random, avoid)
Entropy Regime Classification:
DRP classifies markets into five entropy regimes:
• CRYSTALLINE (H < 0.3): Maximum order, persistent trends
• ORDERED (H < 0.5): Clear patterns, momentum strategies work
• MODERATE (H < 0.7): Mixed dynamics, adaptive required
• COMPLEX (H < 0.85): High entropy, mean reversion better
• CHAOTIC (H ≥ 0.85): Near-random, minimize trading
Why Permutation Entropy?
Unlike traditional entropy methods requiring binning continuous data (losing information), permutation entropy:
• Works directly on time series
• Robust to monotonic transformations
• Computationally efficient
• Captures temporal structure, not just distribution
• Immune to outliers (uses ranks, not values)
⚡ LYAPUNOV EXPONENT: CHAOS vs STABILITY
The Lyapunov exponent λ measures sensitivity to initial conditions —the hallmark of chaos.
Physical Meaning:
Two trajectories starting infinitely close will diverge at exponential rate e^(λt):
Distance(t) ≈ Distance(0) × e^(λt)
Interpretation:
• λ > 0 : Positive Lyapunov exponent = CHAOS
- Small errors grow exponentially
- Long-term prediction impossible
- System is sensitive, unpredictable
- AVOID TRADING
• λ ≈ 0 : Near-zero = CRITICAL STATE
- Edge of chaos
- Transition zone between order and disorder
- Moderate predictability
- PROCEED WITH CAUTION
• λ < 0 : Negative Lyapunov exponent = STABLE
- Small errors decay
- Trajectories converge
- System is predictable
- OPTIMAL FOR TRADING
Estimation Method:
DRP estimates λ by tracking how quickly nearby states diverge over a rolling window (default 20 bars):
For each bar i in window:
δ₀ = |x - x | (initial separation)
δ₁ = |x - x | (previous separation)
if δ₁ > 0:
ratio = δ₀ / δ₁
log_ratios += ln(ratio)
λ ≈ average(log_ratios)
Stability Classification:
• STABLE : λ < 0 (negative growth rate)
• CRITICAL : |λ| < 0.1 (near neutral)
• CHAOTIC : λ > 0.2 (strong positive growth)
Signal Filtering:
By default, NEXUS requires λ < 0 (stable regime) for signal confirmation. This filters out trades during chaotic periods when technical patterns break down.
📐 HIGUCHI FRACTAL DIMENSION
Fractal dimension measures self-similarity and complexity of the price trajectory.
Theoretical Background:
A curve's fractal dimension D ranges from 1 (smooth line) to 2 (space-filling curve):
• D ≈ 1.0 : Smooth, persistent trending
• D ≈ 1.5 : Random walk (Brownian motion)
• D ≈ 2.0 : Highly irregular, space-filling
Higuchi Method (1988):
For a time series of length N, construct k different curves by taking every k-th point:
L(k) = (1/k) × Σ|x - x | × (N-1)/(⌊(N-m)/k⌋ × k)
For different values of k (1 to k_max), calculate L(k). The fractal dimension is the slope of log(L(k)) vs log(1/k):
D = slope of log(L) vs log(1/k)
Market Interpretation:
• D < 1.35 : Strong trending, persistent (Hurst > 0.5)
- TRENDING regime
- Momentum strategies favored
- Breakouts likely to continue
• D = 1.35-1.45 : Moderate persistence
- PERSISTENT regime
- Trend-following with caution
- Patterns have meaning
• D = 1.45-1.55 : Random walk territory
- RANDOM regime
- Efficiency hypothesis holds
- Technical analysis least reliable
• D = 1.55-1.65 : Anti-persistent (mean-reverting)
- ANTI-PERSISTENT regime
- Oscillator strategies work
- Overbought/oversold meaningful
• D > 1.65 : Highly complex, choppy
- COMPLEX regime
- Avoid directional bets
- Wait for regime change
Signal Filtering:
Resonance signals (secondary signal type) require D < 1.5, indicating trending or persistent dynamics where momentum has meaning.
🔗 TRANSFER ENTROPY: CAUSAL INFORMATION FLOW
Transfer entropy measures directed causal influence between time series—not just correlation, but actual information transfer.
Schreiber's Definition (2000):
Transfer entropy from X to Y measures how much knowing X's past reduces uncertainty about Y's future:
TE(X→Y) = H(Y_future | Y_past) - H(Y_future | Y_past, X_past)
Where H is Shannon entropy.
Key Properties:
1. Directional : TE(X→Y) ≠ TE(Y→X) in general
2. Non-linear : Detects complex causal relationships
3. Model-free : No assumptions about functional form
4. Lag-independent : Captures delayed causal effects
Three Causal Flows Measured:
1. Volume → Price (TE_V→P):
Measures how much volume patterns predict price changes.
• TE > 0 : Volume provides predictive information about price
- Institutional participation driving moves
- Volume confirms direction
- High reliability
• TE ≈ 0 : No causal flow (weak volume/price relationship)
- Volume uninformative
- Caution on signals
• TE < 0 (rare): Suggests price leading volume
- Potentially manipulated or thin market
2. Volatility → Momentum (TE_σ→M):
Does volatility expansion predict momentum changes?
• Positive TE : Volatility precedes momentum shifts
- Breakout dynamics
- Regime transitions
3. Structure → Price (TE_S→P):
Do support/resistance patterns causally influence price?
• Positive TE : Structural levels have causal impact
- Technical levels matter
- Market respects structure
Net Causal Flow:
Net_Flow = TE_V→P + 0.5·TE_σ→M + TE_S→P
• Net > +0.1 : Bullish causal structure
• Net < -0.1 : Bearish causal structure
• |Net| < 0.1 : Neutral/unclear causation
Causal Gate:
For signal confirmation, NEXUS requires:
• Buy signals : TE_V→P > 0 AND Net_Flow > 0.05
• Sell signals : TE_V→P > 0 AND Net_Flow < -0.05
This ensures volume is actually driving price (causal support exists), not just correlated noise.
Implementation Note:
Computing true transfer entropy requires discretizing continuous data into bins (default 6 bins) and estimating joint probability distributions. NEXUS uses a hybrid approach combining TE theory with autocorrelation structure and lagged cross-correlation to approximate information transfer in computationally efficient manner.
🌊 HILBERT PHASE COHERENCE
Phase coherence measures synchronization across market dimensions using Hilbert transform analysis.
Hilbert Transform Theory:
For a signal x(t), the Hilbert transform H (t) creates an analytic signal:
z(t) = x(t) + i·H (t) = A(t)·e^(iφ(t))
Where:
• A(t) = Instantaneous amplitude
• φ(t) = Instantaneous phase
Instantaneous Phase:
φ(t) = arctan(H (t) / x(t))
The phase represents where the signal is in its natural cycle—analogous to position on a unit circle.
Four Dimensions Analyzed:
1. Momentum Phase : Phase of price rate-of-change
2. Volume Phase : Phase of volume intensity
3. Volatility Phase : Phase of ATR cycles
4. Structure Phase : Phase of position within range
Phase Locking Value (PLV):
For two signals with phases φ₁(t) and φ₂(t), PLV measures phase synchronization:
PLV = |⟨e^(i(φ₁(t) - φ₂(t)))⟩|
Where ⟨·⟩ is time average over window.
Interpretation:
• PLV = 0 : Completely random phase relationship (no synchronization)
• PLV = 0.5 : Moderate phase locking
• PLV = 1 : Perfect synchronization (phases locked)
Pairwise PLV Calculations:
• PLV_momentum-volume : Are momentum and volume cycles synchronized?
• PLV_momentum-structure : Are momentum cycles aligned with structure?
• PLV_volume-structure : Are volume and structural patterns in phase?
Overall Phase Coherence:
Coherence = (PLV_mom-vol + PLV_mom-struct + PLV_vol-struct) / 3
Signal Confirmation:
Emergence signals require coherence ≥ threshold (default 0.70):
• Below 0.70: Dimensions not synchronized, no coherent market state
• Above 0.70: Dimensions in phase, coherent behavior emerging
Coherence Direction:
The summed phase angles indicate whether synchronized dimensions point bullish or bearish:
Direction = sin(φ_momentum) + 0.5·sin(φ_volume) + 0.5·sin(φ_structure)
• Direction > 0 : Phases pointing upward (bullish synchronization)
• Direction < 0 : Phases pointing downward (bearish synchronization)
🌀 EMERGENCE SCORE: MULTI-DIMENSIONAL ALIGNMENT
The emergence score aggregates all complexity metrics into a single 0-1 value representing market coherence.
Eight Components with Weights:
1. Phase Coherence (20%):
Direct contribution: coherence × 0.20
Measures dimensional synchronization.
2. Entropy Regime (15%):
Contribution: (0.6 - H_perm) / 0.6 × 0.15 if H < 0.6, else 0
Rewards low entropy (ordered, predictable states).
3. Lyapunov Stability (12%):
• λ < 0 (stable): +0.12
• |λ| < 0.1 (critical): +0.08
• λ > 0.2 (chaotic): +0.0
Requires stable, predictable dynamics.
4. Fractal Dimension Trending (12%):
Contribution: (1.45 - D) / 0.45 × 0.12 if D < 1.45, else 0
Rewards trending fractal structure (D < 1.45).
5. Dimensional Resonance (12%):
Contribution: |dimensional_resonance| × 0.12
Measures alignment across momentum, volume, structure, volatility dimensions.
6. Causal Flow Strength (9%):
Contribution: |net_causal_flow| × 0.09
Rewards strong causal relationships.
7. Phase Space Embedding (10%):
Contribution: min(|phase_magnitude_norm|, 3.0) / 3.0 × 0.10 if |magnitude| > 1.0
Rewards strong trajectory in reconstructed phase space.
8. Recurrence Quality (10%):
Contribution: determinism × 0.10 if DET > 0.3 AND 0.1 < RR < 0.8
Rewards deterministic patterns with moderate recurrence.
Total Emergence Score:
E = Σ(components) ∈
Capped at 1.0 maximum.
Emergence Direction:
Separate calculation determining bullish vs bearish:
• Dimensional resonance sign
• Net causal flow sign
• Phase magnitude correlation with momentum
Signal Threshold:
Default emergence_threshold = 0.75 means 75% of maximum possible emergence score required to trigger signals.
Why Emergence Matters:
Traditional indicators measure single dimensions. Emergence detects self-organization —when multiple independent dimensions spontaneously align. This is the market equivalent of a phase transition in physics, where microscopic chaos gives way to macroscopic order.
These are the highest-probability trade opportunities because the entire system is resonating in the same direction.
🎯 SIGNAL GENERATION: EMERGENCE vs RESONANCE
DRP generates two tiers of signals with different requirements:
TIER 1: EMERGENCE SIGNALS (Primary)
Requirements:
1. Emergence score ≥ threshold (default 0.75)
2. Phase coherence ≥ threshold (default 0.70)
3. Emergence direction > 0.2 (bullish) or < -0.2 (bearish)
4. Causal gate passed (if enabled): TE_V→P > 0 and net_flow confirms direction
5. Stability zone (if enabled): λ < 0 or |λ| < 0.1
6. Price confirmation: Close > open (bulls) or close < open (bears)
7. Cooldown satisfied: bars_since_signal ≥ cooldown_period
EMERGENCE BUY:
• All above conditions met with bullish direction
• Market has achieved coherent bullish state
• Multiple dimensions synchronized upward
EMERGENCE SELL:
• All above conditions met with bearish direction
• Market has achieved coherent bearish state
• Multiple dimensions synchronized downward
Premium Emergence:
When signal_quality (emergence_score × phase_coherence) > 0.7:
• Displayed as ★ star symbol
• Highest conviction trades
• Maximum dimensional alignment
Standard Emergence:
When signal_quality 0.5-0.7:
• Displayed as ◆ diamond symbol
• Strong signals but not perfect alignment
TIER 2: RESONANCE SIGNALS (Secondary)
Requirements:
1. Dimensional resonance > +0.6 (bullish) or < -0.6 (bearish)
2. Fractal dimension < 1.5 (trending/persistent regime)
3. Price confirmation matches direction
4. NOT in chaotic regime (λ < 0.2)
5. Cooldown satisfied
6. NO emergence signal firing (resonance is fallback)
RESONANCE BUY:
• Dimensional alignment without full emergence
• Trending fractal structure
• Moderate conviction
RESONANCE SELL:
• Dimensional alignment without full emergence
• Bearish resonance with trending structure
• Moderate conviction
Displayed as small ▲/▼ triangles with transparency.
Signal Hierarchy:
IF emergence conditions met:
Fire EMERGENCE signal (★ or ◆)
ELSE IF resonance conditions met:
Fire RESONANCE signal (▲ or ▼)
ELSE:
No signal
Cooldown System:
After any signal fires, cooldown_period (default 5 bars) must elapse before next signal. This prevents signal clustering during persistent conditions.
Cooldown tracks using bar_index:
bars_since_signal = current_bar_index - last_signal_bar_index
cooldown_ok = bars_since_signal >= cooldown_period
🎨 VISUAL SYSTEM: MULTI-LAYER COMPLEXITY
DRP provides rich visual feedback across four distinct layers:
LAYER 1: COHERENCE FIELD (Background)
Colored background intensity based on phase coherence:
• No background : Coherence < 0.5 (incoherent state)
• Faint glow : Coherence 0.5-0.7 (building coherence)
• Stronger glow : Coherence > 0.7 (coherent state)
Color:
• Cyan/teal: Bullish coherence (direction > 0)
• Red/magenta: Bearish coherence (direction < 0)
• Blue: Neutral coherence (direction ≈ 0)
Transparency: 98 minus (coherence_intensity × 10), so higher coherence = more visible.
LAYER 2: STABILITY/CHAOS ZONES
Background color indicating Lyapunov regime:
• Green tint (95% transparent): λ < 0, STABLE zone
- Safe to trade
- Patterns meaningful
• Gold tint (90% transparent): |λ| < 0.1, CRITICAL zone
- Edge of chaos
- Moderate risk
• Red tint (85% transparent): λ > 0.2, CHAOTIC zone
- Avoid trading
- Unpredictable behavior
LAYER 3: DIMENSIONAL RIBBONS
Three EMAs representing dimensional structure:
• Fast ribbon : EMA(8) in cyan/teal (fast dynamics)
• Medium ribbon : EMA(21) in blue (intermediate)
• Slow ribbon : EMA(55) in red/magenta (slow dynamics)
Provides visual reference for multi-scale structure without cluttering with raw phase space data.
LAYER 4: CAUSAL FLOW LINE
A thicker line plotted at EMA(13) colored by net causal flow:
• Cyan/teal : Net_flow > +0.1 (bullish causation)
• Red/magenta : Net_flow < -0.1 (bearish causation)
• Gray : |Net_flow| < 0.1 (neutral causation)
Shows real-time direction of information flow.
EMERGENCE FLASH:
Strong background flash when emergence signals fire:
• Cyan flash for emergence buy
• Red flash for emergence sell
• 80% transparency for visibility without obscuring price
📊 COMPREHENSIVE DASHBOARD
Real-time monitoring of all complexity metrics:
HEADER:
• 🌀 DRP branding with gold accent
CORE METRICS:
EMERGENCE:
• Progress bar (█ filled, ░ empty) showing 0-100%
• Percentage value
• Direction arrow (↗ bull, ↘ bear, → neutral)
• Color-coded: Green/gold if active, gray if low
COHERENCE:
• Progress bar showing phase locking value
• Percentage value
• Checkmark ✓ if ≥ threshold, circle ○ if below
• Color-coded: Cyan if coherent, gray if not
COMPLEXITY SECTION:
ENTROPY:
• Regime name (CRYSTALLINE/ORDERED/MODERATE/COMPLEX/CHAOTIC)
• Numerical value (0.00-1.00)
• Color: Green (ordered), gold (moderate), red (chaotic)
LYAPUNOV:
• State (STABLE/CRITICAL/CHAOTIC)
• Numerical value (typically -0.5 to +0.5)
• Status indicator: ● stable, ◐ critical, ○ chaotic
• Color-coded by state
FRACTAL:
• Regime (TRENDING/PERSISTENT/RANDOM/ANTI-PERSIST/COMPLEX)
• Dimension value (1.0-2.0)
• Color: Cyan (trending), gold (random), red (complex)
PHASE-SPACE:
• State (STRONG/ACTIVE/QUIET)
• Normalized magnitude value
• Parameters display: d=5 τ=3
CAUSAL SECTION:
CAUSAL:
• Direction (BULL/BEAR/NEUTRAL)
• Net flow value
• Flow indicator: →P (to price), P← (from price), ○ (neutral)
V→P:
• Volume-to-price transfer entropy
• Small display showing specific TE value
DIMENSIONAL SECTION:
RESONANCE:
• Progress bar of absolute resonance
• Signed value (-1 to +1)
• Color-coded by direction
RECURRENCE:
• Recurrence rate percentage
• Determinism percentage display
• Color-coded: Green if high quality
STATE SECTION:
STATE:
• Current mode: EMERGENCE / RESONANCE / CHAOS / SCANNING
• Icon: 🚀 (emergence buy), 💫 (emergence sell), ▲ (resonance buy), ▼ (resonance sell), ⚠ (chaos), ◎ (scanning)
• Color-coded by state
SIGNALS:
• E: count of emergence signals
• R: count of resonance signals
⚙️ KEY PARAMETERS EXPLAINED
Phase Space Configuration:
• Embedding Dimension (3-10, default 5): Reconstruction dimension
- Low (3-4): Simple dynamics, faster computation
- Medium (5-6): Balanced (recommended)
- High (7-10): Complex dynamics, more data needed
- Rule: d ≥ 2D+1 where D is true dimension
• Time Delay (τ) (1-10, default 3): Embedding lag
- Fast markets: 1-2
- Normal: 3-4
- Slow markets: 5-10
- Optimal: First minimum of mutual information (often 2-4)
• Recurrence Threshold (ε) (0.01-0.5, default 0.10): Phase space proximity
- Tight (0.01-0.05): Very similar states only
- Medium (0.08-0.15): Balanced
- Loose (0.20-0.50): Liberal matching
Entropy & Complexity:
• Permutation Order (3-7, default 4): Pattern length
- Low (3): 6 patterns, fast but coarse
- Medium (4-5): 24-120 patterns, balanced
- High (6-7): 720-5040 patterns, fine-grained
- Note: Requires window >> order! for stability
• Entropy Window (15-100, default 30): Lookback for entropy
- Short (15-25): Responsive to changes
- Medium (30-50): Stable measure
- Long (60-100): Very smooth, slow adaptation
• Lyapunov Window (10-50, default 20): Stability estimation window
- Short (10-15): Fast chaos detection
- Medium (20-30): Balanced
- Long (40-50): Stable λ estimate
Causal Inference:
• Enable Transfer Entropy (default ON): Causality analysis
- Keep ON for full system functionality
• TE History Length (2-15, default 5): Causal lookback
- Short (2-4): Quick causal detection
- Medium (5-8): Balanced
- Long (10-15): Deep causal analysis
• TE Discretization Bins (4-12, default 6): Binning granularity
- Few (4-5): Coarse, robust, needs less data
- Medium (6-8): Balanced
- Many (9-12): Fine-grained, needs more data
Phase Coherence:
• Enable Phase Coherence (default ON): Synchronization detection
- Keep ON for emergence detection
• Coherence Threshold (0.3-0.95, default 0.70): PLV requirement
- Loose (0.3-0.5): More signals, lower quality
- Balanced (0.6-0.75): Recommended
- Strict (0.8-0.95): Rare, highest quality
• Hilbert Smoothing (3-20, default 8): Phase smoothing
- Low (3-5): Responsive, noisier
- Medium (6-10): Balanced
- High (12-20): Smooth, more lag
Fractal Analysis:
• Enable Fractal Dimension (default ON): Complexity measurement
- Keep ON for full analysis
• Fractal K-max (4-20, default 8): Scaling range
- Low (4-6): Faster, less accurate
- Medium (7-10): Balanced
- High (12-20): Accurate, slower
• Fractal Window (30-200, default 50): FD lookback
- Short (30-50): Responsive FD
- Medium (60-100): Stable FD
- Long (120-200): Very smooth FD
Emergence Detection:
• Emergence Threshold (0.5-0.95, default 0.75): Minimum coherence
- Sensitive (0.5-0.65): More signals
- Balanced (0.7-0.8): Recommended
- Strict (0.85-0.95): Rare signals
• Require Causal Gate (default ON): TE confirmation
- ON: Only signal when causality confirms
- OFF: Allow signals without causal support
• Require Stability Zone (default ON): Lyapunov filter
- ON: Only signal when λ < 0 (stable) or |λ| < 0.1 (critical)
- OFF: Allow signals in chaotic regimes (risky)
• Signal Cooldown (1-50, default 5): Minimum bars between signals
- Fast (1-3): Rapid signal generation
- Normal (4-8): Balanced
- Slow (10-20): Very selective
- Ultra (25-50): Only major regime changes
Signal Configuration:
• Momentum Period (5-50, default 14): ROC calculation
• Structure Lookback (10-100, default 20): Support/resistance range
• Volatility Period (5-50, default 14): ATR calculation
• Volume MA Period (10-50, default 20): Volume normalization
Visual Settings:
• Customizable color scheme for all elements
• Toggle visibility for each layer independently
• Dashboard position (4 corners) and size (tiny/small/normal)
🎓 PROFESSIONAL USAGE PROTOCOL
Phase 1: System Familiarization (Week 1)
Goal: Understand complexity metrics and dashboard interpretation
Setup:
• Enable all features with default parameters
• Watch dashboard metrics for 500+ bars
• Do NOT trade yet
Actions:
• Observe emergence score patterns relative to price moves
• Note coherence threshold crossings and subsequent price action
• Watch entropy regime transitions (ORDERED → COMPLEX → CHAOTIC)
• Correlate Lyapunov state with signal reliability
• Track which signals appear (emergence vs resonance frequency)
Key Learning:
• When does emergence peak? (usually before major moves)
• What entropy regime produces best signals? (typically ORDERED or MODERATE)
• Does your instrument respect stability zones? (stable λ = better signals)
Phase 2: Parameter Optimization (Week 2)
Goal: Tune system to instrument characteristics
Requirements:
• Understand basic dashboard metrics from Phase 1
• Have 1000+ bars of history loaded
Embedding Dimension & Time Delay:
• If signals very rare: Try lower dimension (d=3-4) or shorter delay (τ=2)
• If signals too frequent: Try higher dimension (d=6-7) or longer delay (τ=4-5)
• Sweet spot: 4-8 emergence signals per 100 bars
Coherence Threshold:
• Check dashboard: What's typical coherence range?
• If coherence rarely exceeds 0.70: Lower threshold to 0.60-0.65
• If coherence often >0.80: Can raise threshold to 0.75-0.80
• Goal: Signals fire during top 20-30% of coherence values
Emergence Threshold:
• If too few signals: Lower to 0.65-0.70
• If too many signals: Raise to 0.80-0.85
• Balance with coherence threshold—both must be met
Phase 3: Signal Quality Assessment (Weeks 3-4)
Goal: Verify signals have edge via paper trading
Requirements:
• Parameters optimized per Phase 2
• 50+ signals generated
• Detailed notes on each signal
Paper Trading Protocol:
• Take EVERY emergence signal (★ and ◆)
• Optional: Take resonance signals (▲/▼) separately to compare
• Use simple exit: 2R target, 1R stop (ATR-based)
• Track: Win rate, average R-multiple, maximum consecutive losses
Quality Metrics:
• Premium emergence (★) : Should achieve >55% WR
• Standard emergence (◆) : Should achieve >50% WR
• Resonance signals : Should achieve >45% WR
• Overall : If <45% WR, system not suitable for this instrument/timeframe
Red Flags:
• Win rate <40%: Wrong instrument or parameters need major adjustment
• Max consecutive losses >10: System not working in current regime
• Profit factor <1.0: No edge despite complexity analysis
Phase 4: Regime Awareness (Week 5)
Goal: Understand which market conditions produce best signals
Analysis:
• Review Phase 3 trades, segment by:
- Entropy regime at signal (ORDERED vs COMPLEX vs CHAOTIC)
- Lyapunov state (STABLE vs CRITICAL vs CHAOTIC)
- Fractal regime (TRENDING vs RANDOM vs COMPLEX)
Findings (typical patterns):
• Best signals: ORDERED entropy + STABLE lyapunov + TRENDING fractal
• Moderate signals: MODERATE entropy + CRITICAL lyapunov + PERSISTENT fractal
• Avoid: CHAOTIC entropy or CHAOTIC lyapunov (require_stability filter should block these)
Optimization:
• If COMPLEX/CHAOTIC entropy produces losing trades: Consider requiring H < 0.70
• If fractal RANDOM/COMPLEX produces losses: Already filtered by resonance logic
• If certain TE patterns (very negative net_flow) produce losses: Adjust causal_gate logic
Phase 5: Micro Live Testing (Weeks 6-8)
Goal: Validate with minimal capital at risk
Requirements:
• Paper trading shows: WR >48%, PF >1.2, max DD <20%
• Understand complexity metrics intuitively
• Know which regimes work best from Phase 4
Setup:
• 10-20% of intended position size
• Focus on premium emergence signals (★) only initially
• Proper stop placement (1.5-2.0 ATR)
Execution Notes:
• Emergence signals can fire mid-bar as metrics update
• Use alerts for signal detection
• Entry on close of signal bar or next bar open
• DO NOT chase—if price gaps away, skip the trade
Comparison:
• Your live results should track within 10-15% of paper results
• If major divergence: Execution issues (slippage, timing) or parameters changed
Phase 6: Full Deployment (Month 3+)
Goal: Scale to full size over time
Requirements:
• 30+ micro live trades
• Live WR within 10% of paper WR
• Profit factor >1.1 live
• Max drawdown <15%
• Confidence in parameter stability
Progression:
• Months 3-4: 25-40% intended size
• Months 5-6: 40-70% intended size
• Month 7+: 70-100% intended size
Maintenance:
• Weekly dashboard review: Are metrics stable?
• Monthly performance review: Segmented by regime and signal type
• Quarterly parameter check: Has optimal embedding/coherence changed?
Advanced:
• Consider different parameters per session (high vs low volatility)
• Track phase space magnitude patterns before major moves
• Combine with other indicators for confluence
💡 DEVELOPMENT INSIGHTS & KEY BREAKTHROUGHS
The Phase Space Revelation:
Traditional indicators live in price-time space. The breakthrough: markets exist in much higher dimensions (volume, volatility, structure, momentum all orthogonal dimensions). Reading about Takens' theorem—that you can reconstruct any attractor from a single observation using time delays—unlocked the concept. Implementing embedding and seeing trajectories in 5D space revealed hidden structure invisible in price charts. Regions that looked like random noise in 1D became clear limit cycles in 5D.
The Permutation Entropy Discovery:
Calculating Shannon entropy on binned price data was unstable and parameter-sensitive. Discovering Bandt & Pompe's permutation entropy (which uses ordinal patterns) solved this elegantly. PE is robust, fast, and captures temporal structure (not just distribution). Testing showed PE < 0.5 periods had 18% higher signal win rate than PE > 0.7 periods. Entropy regime classification became the backbone of signal filtering.
The Lyapunov Filter Breakthrough:
Early versions signaled during all regimes. Win rate hovered at 42%—barely better than random. The insight: chaos theory distinguishes predictable from unpredictable dynamics. Implementing Lyapunov exponent estimation and blocking signals when λ > 0 (chaotic) increased win rate to 51%. Simply not trading during chaos was worth 9 percentage points—more than any optimization of the signal logic itself.
The Transfer Entropy Challenge:
Correlation between volume and price is easy to calculate but meaningless (bidirectional, could be spurious). Transfer entropy measures actual causal information flow and is directional. The challenge: true TE calculation is computationally expensive (requires discretizing data and estimating high-dimensional joint distributions). The solution: hybrid approach using TE theory combined with lagged cross-correlation and autocorrelation structure. Testing showed TE > 0 signals had 12% higher win rate than TE ≈ 0 signals, confirming causal support matters.
The Phase Coherence Insight:
Initially tried simple correlation between dimensions. Not predictive. Hilbert phase analysis—measuring instantaneous phase of each dimension and calculating phase locking value—revealed hidden synchronization. When PLV > 0.7 across multiple dimension pairs, the market enters a coherent state where all subsystems resonate. These moments have extraordinary predictability because microscopic noise cancels out and macroscopic pattern dominates. Emergence signals require high PLV for this reason.
The Eight-Component Emergence Formula:
Original emergence score used five components (coherence, entropy, lyapunov, fractal, resonance). Performance was good but not exceptional. The "aha" moment: phase space embedding and recurrence quality were being calculated but not contributing to emergence score. Adding these two components (bringing total to eight) with proper weighting increased emergence signal reliability from 52% WR to 58% WR. All calculated metrics must contribute to the final score. If you compute something, use it.
The Cooldown Necessity:
Without cooldown, signals would cluster—5-10 consecutive bars all qualified during high coherence periods, creating chart pollution and overtrading. Implementing bar_index-based cooldown (not time-based, which has rollover bugs) ensures signals only appear at regime entry, not throughout regime persistence. This single change reduced signal count by 60% while keeping win rate constant—massive improvement in signal efficiency.
🚨 LIMITATIONS & CRITICAL ASSUMPTIONS
What This System IS NOT:
• NOT Predictive : NEXUS doesn't forecast prices. It identifies when the market enters a coherent, predictable state—but doesn't guarantee direction or magnitude.
• NOT Holy Grail : Typical performance is 50-58% win rate with 1.5-2.0 avg R-multiple. This is probabilistic edge from complexity analysis, not certainty.
• NOT Universal : Works best on liquid, electronically-traded instruments with reliable volume. Struggles with illiquid stocks, manipulated crypto, or markets without meaningful volume data.
• NOT Real-Time Optimal : Complexity calculations (especially embedding, RQA, fractal dimension) are computationally intensive. Dashboard updates may lag by 1-2 seconds on slower connections.
• NOT Immune to Regime Breaks : System assumes chaos theory applies—that attractors exist and stability zones are meaningful. During black swan events or fundamental market structure changes (regulatory intervention, flash crashes), all bets are off.
Core Assumptions:
1. Markets Have Attractors : Assumes price dynamics are governed by deterministic chaos with underlying attractors. Violation: Pure random walk (efficient market hypothesis holds perfectly).
2. Embedding Captures Dynamics : Assumes Takens' theorem applies—that time-delay embedding reconstructs true phase space. Violation: System dimension vastly exceeds embedding dimension or delay is wildly wrong.
3. Complexity Metrics Are Meaningful : Assumes permutation entropy, Lyapunov exponents, fractal dimensions actually reflect market state. Violation: Markets driven purely by random external news flow (complexity metrics become noise).
4. Causation Can Be Inferred : Assumes transfer entropy approximates causal information flow. Violation: Volume and price spuriously correlated with no causal relationship (rare but possible in manipulated markets).
5. Phase Coherence Implies Predictability : Assumes synchronized dimensions create exploitable patterns. Violation: Coherence by chance during random period (false positive).
6. Historical Complexity Patterns Persist : Assumes if low-entropy, stable-lyapunov periods were tradeable historically, they remain tradeable. Violation: Fundamental regime change (market structure shifts, e.g., transition from floor trading to HFT).
Performs Best On:
• ES, NQ, RTY (major US index futures - high liquidity, clean volume data)
• Major forex pairs: EUR/USD, GBP/USD, USD/JPY (24hr markets, good for phase analysis)
• Liquid commodities: CL (crude oil), GC (gold), NG (natural gas)
• Large-cap stocks: AAPL, MSFT, GOOGL, TSLA (>$10M daily volume, meaningful structure)
• Major crypto on reputable exchanges: BTC, ETH on Coinbase/Kraken (avoid Binance due to manipulation)
Performs Poorly On:
• Low-volume stocks (<$1M daily volume) - insufficient liquidity for complexity analysis
• Exotic forex pairs - erratic spreads, thin volume
• Illiquid altcoins - wash trading, bot manipulation invalidates volume analysis
• Pre-market/after-hours - gappy, thin, different dynamics
• Binary events (earnings, FDA approvals) - discontinuous jumps violate dynamical systems assumptions
• Highly manipulated instruments - spoofing and layering create false coherence
Known Weaknesses:
• Computational Lag : Complexity calculations require iterating over windows. On slow connections, dashboard may update 1-2 seconds after bar close. Signals may appear delayed.
• Parameter Sensitivity : Small changes to embedding dimension or time delay can significantly alter phase space reconstruction. Requires careful calibration per instrument.
• Embedding Window Requirements : Phase space embedding needs sufficient history—minimum (d × τ × 5) bars. If embedding_dimension=5 and time_delay=3, need 75+ bars. Early bars will be unreliable.
• Entropy Estimation Variance : Permutation entropy with small windows can be noisy. Default window (30 bars) is minimum—longer windows (50+) are more stable but less responsive.
• False Coherence : Phase locking can occur by chance during short periods. Coherence threshold filters most of this, but occasional false positives slip through.
• Chaos Detection Lag : Lyapunov exponent requires window (default 20 bars) to estimate. Market can enter chaos and produce bad signal before λ > 0 is detected. Stability filter helps but doesn't eliminate this.
• Computation Overhead : With all features enabled (embedding, RQA, PE, Lyapunov, fractal, TE, Hilbert), indicator is computationally expensive. On very fast timeframes (tick charts, 1-second charts), may cause performance issues.
⚠️ RISK DISCLOSURE
Trading futures, forex, stocks, options, and cryptocurrencies involves substantial risk of loss and is not suitable for all investors. Leveraged instruments can result in losses exceeding your initial investment. Past performance, whether backtested or live, is not indicative of future results.
The Dimensional Resonance Protocol, including its phase space reconstruction, complexity analysis, and emergence detection algorithms, is provided for educational and research purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any security or instrument.
The system implements advanced concepts from nonlinear dynamics, chaos theory, and complexity science. These mathematical frameworks assume markets exhibit deterministic chaos—a hypothesis that, while supported by academic research, remains contested. Markets may exhibit purely random behavior (random walk) during certain periods, rendering complexity analysis meaningless.
Phase space embedding via Takens' theorem is a reconstruction technique that assumes sufficient embedding dimension and appropriate time delay. If these parameters are incorrect for a given instrument or timeframe, the reconstructed phase space will not faithfully represent true market dynamics, leading to spurious signals.
Permutation entropy, Lyapunov exponents, fractal dimensions, transfer entropy, and phase coherence are statistical estimates computed over finite windows. All have inherent estimation error. Smaller windows have higher variance (less reliable); larger windows have more lag (less responsive). There is no universally optimal window size.
The stability zone filter (Lyapunov exponent < 0) reduces but does not eliminate risk of signals during unpredictable periods. Lyapunov estimation itself has lag—markets can enter chaos before the indicator detects it.
Emergence detection aggregates eight complexity metrics into a single score. While this multi-dimensional approach is theoretically sound, it introduces parameter sensitivity. Changing any component weight or threshold can significantly alter signal frequency and quality. Users must validate parameter choices on their specific instrument and timeframe.
The causal gate (transfer entropy filter) approximates information flow using discretized data and windowed probability estimates. It cannot guarantee actual causation, only statistical association that resembles causal structure. Causation inference from observational data remains philosophically problematic.
Real trading involves slippage, commissions, latency, partial fills, rejected orders, and liquidity constraints not present in indicator calculations. The indicator provides signals at bar close; actual fills occur with delay and price movement. Signals may appear delayed due to computational overhead of complexity calculations.
Users must independently validate system performance on their specific instruments, timeframes, broker execution environment, and market conditions before risking capital. Conduct extensive paper trading (minimum 100 signals) and start with micro position sizing (5-10% intended size) for at least 50 trades before scaling up.
Never risk more capital than you can afford to lose completely. Use proper position sizing (0.5-2% risk per trade maximum). Implement stop losses on every trade. Maintain adequate margin/capital reserves. Understand that most retail traders lose money. Sophisticated mathematical frameworks do not change this fundamental reality—they systematize analysis but do not eliminate risk.
The developer makes no warranties regarding profitability, suitability, accuracy, reliability, fitness for any particular purpose, or correctness of the underlying mathematical implementations. Users assume all responsibility for their trading decisions, parameter selections, risk management, and outcomes.
By using this indicator, you acknowledge that you have read, understood, and accepted these risk disclosures and limitations, and you accept full responsibility for all trading activity and potential losses.
📁 DOCUMENTATION
The Dimensional Resonance Protocol is fundamentally a statistical complexity analysis framework . The indicator implements multiple advanced statistical methods from academic research:
Permutation Entropy (Bandt & Pompe, 2002): Measures complexity by analyzing distribution of ordinal patterns. Pure statistical concept from information theory.
Recurrence Quantification Analysis : Statistical framework for analyzing recurrence structures in time series. Computes recurrence rate, determinism, and diagonal line statistics.
Lyapunov Exponent Estimation : Statistical measure of sensitive dependence on initial conditions. Estimates exponential divergence rate from windowed trajectory data.
Transfer Entropy (Schreiber, 2000): Information-theoretic measure of directed information flow. Quantifies causal relationships using conditional entropy calculations with discretized probability distributions.
Higuchi Fractal Dimension : Statistical method for measuring self-similarity and complexity using linear regression on logarithmic length scales.
Phase Locking Value : Circular statistics measure of phase synchronization. Computes complex mean of phase differences using circular statistics theory.
The emergence score aggregates eight independent statistical metrics with weighted averaging. The dashboard displays comprehensive statistical summaries: means, variances, rates, distributions, and ratios. Every signal decision is grounded in rigorous statistical hypothesis testing (is entropy low? is lyapunov negative? is coherence above threshold?).
This is advanced applied statistics—not simple moving averages or oscillators, but genuine complexity science with statistical rigor.
Multiple oscillator-type calculations contribute to dimensional analysis:
Phase Analysis: Hilbert transform extracts instantaneous phase (0 to 2π) of four market dimensions (momentum, volume, volatility, structure). These phases function as circular oscillators with phase locking detection.
Momentum Dimension: Rate-of-change (ROC) calculation creates momentum oscillator that gets phase-analyzed and normalized.
Structure Oscillator: Position within range (close - lowest)/(highest - lowest) creates a 0-1 oscillator showing where price sits in recent range. This gets embedded and phase-analyzed.
Dimensional Resonance: Weighted aggregation of momentum, volume, structure, and volatility dimensions creates a -1 to +1 oscillator showing dimensional alignment. Similar to traditional oscillators but multi-dimensional.
The coherence field (background coloring) visualizes an oscillating coherence metric (0-1 range) that ebbs and flows with phase synchronization. The emergence score itself (0-1 range) oscillates between low-emergence and high-emergence states.
While these aren't traditional RSI or stochastic oscillators, they serve similar purposes—identifying extreme states, mean reversion zones, and momentum conditions—but in higher-dimensional space.
Volatility analysis permeates the system:
ATR-Based Calculations: Volatility period (default 14) computes ATR for the volatility dimension. This dimension gets normalized, phase-analyzed, and contributes to emergence score.
Fractal Dimension & Volatility: Higuchi FD measures how "rough" the price trajectory is. Higher FD (>1.6) correlates with higher volatility/choppiness. FD < 1.4 indicates smooth trends (lower effective volatility).
Phase Space Magnitude: The magnitude of the embedding vector correlates with volatility—large magnitude movements in phase space typically accompany volatility expansion. This is the "energy" of the market trajectory.
Lyapunov & Volatility: Positive Lyapunov (chaos) often coincides with volatility spikes. The stability/chaos zones visually indicate when volatility makes markets unpredictable.
Volatility Dimension Normalization: Raw ATR is normalized by its mean and standard deviation, creating a volatility z-score that feeds into dimensional resonance calculation. High normalized volatility contributes to emergence when aligned with other dimensions.
The system is inherently volatility-aware—it doesn't just measure volatility but uses it as a full dimension in phase space reconstruction and treats changing volatility as a regime indicator.
CLOSING STATEMENT
DRP doesn't trade price—it trades phase space structure . It doesn't chase patterns—it detects emergence . It doesn't guess at trends—it measures coherence .
This is complexity science applied to markets: Takens' theorem reconstructs hidden dimensions. Permutation entropy measures order. Lyapunov exponents detect chaos. Transfer entropy reveals causation. Hilbert phases find synchronization. Fractal dimensions quantify self-similarity.
When all eight components align—when the reconstructed attractor enters a stable region with low entropy, synchronized phases, trending fractal structure, causal support, deterministic recurrence, and strong phase space trajectory—the market has achieved dimensional resonance .
These are the highest-probability moments. Not because an indicator said so. Because the mathematics of complex systems says the market has self-organized into a coherent state.
Most indicators see shadows on the wall. DRP reconstructs the cave.
"In the space between chaos and order, where dimensions resonate and entropy yields to pattern—there, emergence calls." DRP
Taking you to school. — Dskyz, Trade with insight. Trade with anticipation.
H1 Pro Neon SignalsFull Description:
H1 Pro Regression Channel + Levels + RSI + Signals + Colored Gaps + Divergence Table + Liquidity Filter (NEON UI)
This advanced TradingView indicator combines multiple powerful tools for intraday and swing traders into a single, visually intuitive dashboard:
Features:
Regression Channel (H1): Auto-calculated upper, middle, and lower channels with smooth deviation bands.
Strong Levels: Detects high-probability support and resistance zones with liquidity filtering (volume & candle body).
RSI + Divergence: Highlights bullish and bearish divergences with pivot-based confirmation.
EMA Trend Confirmation: EMA50 and EMA200 plotted for trend bias.
Neon Signals & Table: Visual buy/sell signals with % participation, total volume, quantity, RSI, and divergence in a neon-styled table.
Liquidity Filters: Optional volume and candle body filters for stronger signal validation.
Colored Gaps & Highlights: Neon-colored lines and zones for instant visual clarity.
Settings: Fully customizable regression window, pivot strength, distance filters, EMA lengths, volume multipliers, and more.
Ideal for traders looking for a consolidated view of trend, momentum, support/resistance, divergence, and liquidity-based entries, all presented in a futuristic neon UI.
Pivot Reversal Signals - Multi ConfirmationPivot Reversal Signals - Multi-Confirmation System
Overview
A comprehensive reversal detection indicator designed for daytraders that combines six independent technical signals to identify high-probability pivot points. The indicator uses a scoring system to classify signal strength as Weak, Medium, or Strong based on the number of confirmations present.
How It Works
The indicator monitors six key reversal signals simultaneously:
1. RSI Divergence - Detects when price makes new highs/lows but RSI shows weakening momentum
2. MACD Divergence - Identifies divergence between price action and MACD histogram
3. Key Level Touch - Confirms price is at significant support/resistance (previous day high/low, premarket high/low, VWAP, 50 SMA)
4. Reversal Candlestick Patterns - Recognizes bullish/bearish engulfing, hammers, and shooting stars
5. Moving Average Confluence - Validates bounces/rejections at stacked moving averages (9/20/50)
6. Volume Spike - Confirms increased participation (default: 1.5x average volume)
Signal Strength Classification
• Weak (3/6 confirmations) - Small circles for situational awareness only
• Medium (4/6 confirmations) - Regular triangles, viable entry signals
• Strong (5-6/6 confirmations) - Large triangles with background highlight, highest probability setups
Visual Features
• Entry Signals: Green triangles (up) for long entries, red triangles (down) for short entries
• Exit Warnings: Orange X markers when opposing signals appear
• Signal Labels: Show confirmation score (e.g., "5/6") and strength level
• Key Levels Displayed:
o Previous Day High/Low - Solid green/red lines (uses actual daily data)
o Premarket High/Low - Blue/orange circles (4:00 AM - 9:30 AM EST)
o VWAP - Purple line
o Moving Averages - 9 EMA (blue), 20 EMA (orange), 50 SMA (red)
• Background Tinting: Subtle color on strongest reversal zones
Key Level Detection
The indicator uses request.security() to accurately fetch previous day's high/low from daily timeframe data, ensuring precise level placement. Premarket high/low levels are dynamically tracked during premarket sessions (4:00 AM - 9:30 AM EST) and plotted throughout the trading day, providing critical support/resistance zones that often influence price action during regular hours.
Customizable Parameters
• Signal strength thresholds (adjust required confirmations)
• RSI settings (length, overbought/oversold levels)
• MACD parameters (fast/slow/signal lengths)
• Moving average periods
• Volume spike multiplier
• Toggle individual display elements (levels, MAs, labels)
Best Practices
• Use on 5-minute charts for entries, confirm on 15-minute for direction
• Focus on Medium and Strong signals; Weak signals provide context only
• Strong signals (5-6 confirmations) have the highest win rate
• Pay special attention to reversals at premarket high/low - these levels frequently hold
• Previous day high/low often acts as major support/resistance
• Always use proper risk management and stop losses
• Works best in moderately trending markets
Alert Capabilities
Set custom alerts for:
• Strong long/short signals
• All entry signals (medium + strong)
• Exit warnings for open positions
Ideal For
• Daytraders and scalpers (especially SPY, QQQ, and liquid equities)
• Swing traders seeking precise entries
• Traders who prefer confirmation-based systems
• Anyone looking to reduce false signals with multi-factor validation
• Traders who utilize premarket levels in their strategy
Technical Notes
• Uses Pine Script v6
• Premarket hours: 4:00 AM - 9:30 AM EST
• Previous day levels pulled from daily timeframe for accuracy
• Maximum 500 labels to maintain chart performance
• All key levels update dynamically in real-time
________________________________________
Note: This indicator provides signal analysis only and should be used as part of a complete trading strategy. Past performance does not guarantee future results. Always practice proper risk management.
Gap & Go Day Trading Tool - Key Levels, Alerts & Setup GradingVisualizes Gap & Go setups with automatic gap detection, pre-market levels, and breakout signals. Shows: ✅ Gap % with quality rating (5%/10%/20%+) ✅ Pre-market high/low ✅ First candle range ✅ 50% gap fill target ✅ VWAP ✅ Relative volume. Includes setup grading system (A+ to C), entry signals on PM high breakouts, and 6 customizable alerts. Perfect for momentum day traders focusing on gapping stocks.
Full Description
█ OVERVIEW
The Gap & Go indicator automatically identifies and visualizes gap trading setups - one of the most popular momentum day trading strategies. When a stock gaps up significantly from the prior close, it often signals strong buying interest and potential for continuation moves.
This indicator displays all the key levels you need to trade gaps effectively, grades setup quality, and alerts you to breakout opportunities.
█ HOW IT WORKS
The indicator calculates the gap percentage between yesterday's close and today's open, then displays critical support/resistance levels that gap traders watch:
Gap Zone → The price range between prior close and gap open
Pre-Market High/Low → Key breakout and support levels from extended hours
First Candle Range → Opening range that often defines intraday direction
50% Gap Fill → Common retracement target and support level
VWAP → Institutional reference point
█ GAP CLASSIFICATION
Gaps are automatically classified by magnitude:
🔥 Qualifying Gap (5%+) → Meets minimum threshold for gap trading
🔥🔥 Strong Gap (10%+) → Ideal gap size for momentum plays
🔥🔥🔥 Monster Gap (20%+) → Exceptional move requiring extra attention
Background color changes based on gap quality for instant visual identification.
█ SETUP GRADING SYSTEM
The indicator grades each setup from A+ to C based on multiple factors:
- Gap magnitude (qualifying vs strong)
- Relative volume (2x+ vs 5x+ average)
- Price position relative to VWAP
A+ Setup (4-5 points) → High probability
A Setup (3 points) → Good setup
B Setup (2 points) → Moderate
C Setup (0-1 points) → Weak/avoid
█ ENTRY SIGNALS
Triangle signals appear when price breaks above key levels:
▲ Lime Triangle → Breaking above Pre-Market High
▲ Aqua Triangle → Breaking above First Candle High
Signals require volume confirmation by default (configurable).
█ KEY LEVELS DISPLAYED
- Prior Close (Orange) → Gap reference point
- Pre-Market High (Lime) → Primary breakout level
- Pre-Market Low (Red) → Support if gap fails
- First Candle Range (Aqua box) → Opening range breakout levels
- 50% Gap Fill (Yellow dotted) → Common support/target
- VWAP (Purple) → Institutional pivot
█ INFO TABLE
Real-time dashboard showing:
- Gap % with quality emoji
- Relative Volume with status
- All key price levels
- Breakout status (✓ if broken)
- Distance from PM High
- Setup Grade
█ ALERTS INCLUDED
6 customizable alerts:
1. Qualifying Gap Detected (5%+)
2. Strong Gap Detected (10%+)
3. Monster Gap Detected (20%+)
4. Pre-Market High Breakout
5. First Candle High Breakout
6. 50% Gap Fill Test
7. Full Gap Fill (setup invalidated)
█ SETTINGS
Gap Settings
- Minimum gap % threshold
- Strong gap % threshold
- Monster gap % threshold
Volume Settings
- Enable/disable relative volume filter
- Minimum RVol requirement
- Strong RVol threshold
- RVol calculation period
Level Settings
- Toggle each level type on/off
- Show/hide gap zone
- Show/hide VWAP
Signal Settings
- Breakout signal type (PM High, First Candle, Both)
- Volume confirmation requirement
Visual Settings
- Info table position
- Color customization for all levels
█ HOW TO USE
1. Scan for gapping stocks pre-market (use a scanner or watchlist)
2. Apply this indicator to candidates
3. Check the Setup Grade in the info table
4. Wait for price to consolidate near pre-market high
5. Enter on breakout above PM High with volume confirmation
6. Use 50% gap fill or PM Low as stop loss reference
7. Monitor VWAP - staying above is bullish
█ BEST PRACTICES
✓ Focus on A and A+ setups
✓ Require strong relative volume (5x+)
✓ Trade in the direction of the gap (long for gap ups)
✓ Watch for gap fill as potential support
✓ Be cautious if price falls below VWAP
✓ First 30-60 minutes typically have best momentum
█ TIMEFRAME RECOMMENDATIONS
- 1-minute: Scalping, precise entries
- 5-minute: Most common for gap trading (recommended)
- 15-minute: Swing entries, less noise
█ NOTES
- Pre-market levels require extended hours data enabled
- First candle range is based on the first regular market candle
- Works on stocks, ETFs, and futures
- Gaps down are detected but focus is on gap-up setups
█ DISCLAIMER
This indicator is for educational purposes only. Gap trading involves significant risk. Past performance does not guarantee future results. Always use proper risk management and never risk more than you can afford to lose.
Session ATP (Trend Colored)📌 Average Traded Price (ATP) – What It Means
ATP (Average Traded Price) is the weighted average price at which a stock has traded during the session, considering both price and volume.
It tells you where the majority of money has actually traded — not just the candle close.
If price stays above ATP → Buyers are in control
If price stays below ATP → Sellers dominate
ATP is like the intraday fair value of the stock.
📌 How ATP Helps in Trading
ATP gives three major insights:
1️⃣ Strength of Trend (Real Strength)
ATP rises only if strong volume enters at higher prices.
So, a rising ATP confirms genuine bullish strength, not fake moves.
ATP falling confirms real selling pressure, not random dips.
2️⃣ High-Probability Retests
Price often pulls back to ATP before taking the next direction.
Price above ATP → ATP becomes support
Price below ATP → ATP becomes resistance
This makes ATP extremely useful for intraday entries.
3️⃣ Identifying Where Big Players Are Positioned
Since ATP is volume-weighted, it reflects where institutions and big orders traded most.
If price stays above the level where institutions bought → trend is strong
If price stays below their cost → trend is weak
📌 How ATP Indicates Price Direction
In your improved version, ATP is trend-colored:
✔ Green → ATP rising → buyers dominating
✔ Red → ATP falling → sellers dominating
✔ Gray → sideways
Direction rule:
Bullish bias when price > ATP and ATP rising
Bearish bias when price < ATP and ATP falling
No-trade zone when price and ATP are flat / tangled
ATP often acts as:
Magnet in consolidation
Springboard in uptrend
Ceiling in downtrend
This helps you judge whether the move is:
A breakout with strength, or
A fake move without volume support.
🔥 Final Line
ATP is one of the few indicators that shows where the real money is trading, making it an excellent guide for intraday trend confirmation, support/resistance, and entry timing.
CVD [able0.1]# CVD Overlay iOS Style - Complete User Guide
## 📖 Table of Contents
1. (#what-is-cvd)
2. (#installation-guide)
3. (#understanding-the-display)
4. (#reading-the-info-table)
5. (#settings--customization)
6. (#trading-strategies)
7. (#common-mistakes-to-avoid)
---
## 🎯 What is CVD?
**CVD (Cumulative Volume Delta)** tracks the **difference between buying and selling pressure** over time.
### Simple Explanation:
- **Positive CVD** (Orange) = More buying than selling = Bulls winning
- **Negative CVD** (Gray) = More selling than buying = Bears winning
- **Rising CVD** = Increasing buying pressure = Potential uptrend
- **Falling CVD** = Increasing selling pressure = Potential downtrend
### Why It Matters:
CVD helps you see **who's really in control** of the market - not just price movement, but actual buying/selling volume.
---
## 🚀 Installation Guide
### Step 1: Open Pine Editor
1. Go to TradingView
2. Click the **"Pine Editor"** tab at the bottom of the screen
3. Click **"New"** or open an existing script
### Step 2: Copy & Paste the Code
1. Select all existing code (Ctrl+A / Cmd+A)
2. Delete it
3. Copy the entire CVD iOS Style code
4. Paste it into Pine Editor
### Step 3: Add to Chart
1. Click **"Save"** button (or Ctrl+S / Cmd+S)
2. Click **"Add to Chart"** button
3. The indicator will appear on your chart!
### Step 4: Initial Setup
- The indicator appears as an **overlay** on your price chart
- You'll see an **orange/gray line** following price
- An **info table** appears in the top-right corner
---
## 📊 Understanding the Display
### Main Chart Elements:
#### 1. **CVD Line** (Orange/Gray)
- **Orange Line** = Positive CVD (buying pressure)
- **Gray Line** = Negative CVD (selling pressure)
- This line moves with your price chart but shows volume delta
#### 2. **CVD Zone** (Shaded Area)
- Light shaded box around the CVD line
- Shows the "range" of CVD movement
- Helps visualize CVD boundaries
#### 3. **Center Line** (Dotted)
- Gray dotted line in the middle of the zone
- Represents the "neutral" point
- CVD crossing this = shift in market control
#### 4. **Reference Asset Line** (Light Gray)
- Shows Bitcoin (BTC) price movement for comparison
- Helps you see if your asset moves with or against BTC
- Can be changed to any asset you want
#### 5. **CVD Label**
- Shows current CVD value
- Positioned above/below zone to avoid overlap
- Updates in real-time
#### 6. **Reset Background** (Very Light Gray)
- Appears when CVD resets
- Indicates a new calculation period
---
## 📋 Reading the Info Table
The info table (top-right) shows **8 key metrics**:
### Row 1: **Header**
```
╔═ CVD able ═╗ | 15m | ████████ | able
```
- **CVD able** = Indicator name + creator
- **15m** = Current timeframe
- **████████** = Visual decoration
- **able** = Creator signature
### Row 2: **CVD Value**
```
CVD▲ | 7.39K | ████████ | █
█
█
```
- **CVD▲** = CVD with trend arrow
- ▲ = CVD increasing
- ▼ = CVD decreasing
- ► = CVD unchanged
- **7.39K** = Actual CVD number
- **Progress Bar** = Visual strength (darker = stronger)
- **Vertical Bars** = Height shows intensity
### Row 3: **Delta**
```
◆DELTA | -1.274K | ████░░░░ | ░
░
```
- **Delta** = Volume change THIS BAR ONLY
- **Negative** = More selling this bar
- **Positive** = More buying this bar
- Shows **immediate** pressure (not cumulative)
### Row 4: **UP Volume**
```
UP↑ | -1.263K | ████████ | █
█
█
```
- Total **buying volume** this bar
- Higher = Stronger buying pressure
- Green/Orange vertical bars = Bullish strength
### Row 5: **DOWN Volume**
```
DN↓ | 2.643K | ████████ | ░
░
░
```
- Total **selling volume** this bar
- Higher = Stronger selling pressure
- Gray vertical bars = Bearish strength
### Row 6-7: **Reference Asset** (if enabled)
```
══ REF ══ | ══════ | ████████ | █
█
PRICE▲ | 4130.300 | ████████ | █
█
```
- **REF** = Reference asset header
- **PRICE▲** = Reference price with trend
- Shows if BTC (or chosen asset) is rising/falling
- Compare with your chart to see correlation
### Row 8: **Market Status**
```
◄STATUS► | NEUT | ████░░░░ | ▒
▒
```
- **BULL** = CVD positive + Delta positive = Strong buying
- **BEAR** = CVD negative + Delta negative = Strong selling
- **NEUT** = Mixed signals = Wait for clarity
**Status Colors:**
- **Orange background** = Bullish (good for long)
- **Gray background** = Bearish (good for short)
- **White background** = Neutral (no clear signal)
---
## ⚙️ Settings & Customization
### Main Settings (⚙️)
#### **CVD Reset**
- **None** = CVD never resets (from beginning of data)
- **On Higher Timeframe** = Resets when HTF candle closes
- 15m chart → Resets hourly
- 1h chart → Resets daily
- Recommended for most traders
- **On Session Start** = Resets at market open
- **On Visible Chart** = Resets from leftmost visible bar
#### **Precision**
- **Low (Fast)** = Uses 1m data, faster but less accurate
- **Medium** = Uses 5m data, balanced (recommended)
- **High** = Uses 15m data, most accurate but slower
#### **Cumulative**
- ✅ On = CVD accumulates over time (recommended)
- ❌ Off = Shows only current bar delta
#### **Show Labels**
- ✅ On = Shows CVD value label on chart
- ❌ Off = Cleaner chart, no label
#### **Show Info Table**
- ✅ On = Shows info table (recommended for beginners)
- ❌ Off = Hide table for minimalist view
---
### 🎨 iOS Style Colors
You can customize **every color** to match your chart theme:
#### **Primary Colors**
- **Primary (Orange)** = Main bullish color (#FF9500)
- **Secondary (Gray)** = Main bearish color (#8E8E93)
- **Background** = Table background (#FFFFFF)
- **Text** = Text color (#1C1C1E)
#### **Bullish/Bearish**
- **Bullish (Orange)** = Positive CVD color
- **Bearish (Gray)** = Negative CVD color
- **Opacity** = Zone transparency (0-100%)
- **Show Zone** = Enable/disable shaded area
#### **Table Colors** (📋)
- **Header Background** = Top row background
- **Header Text** = Top row text color
- **Cell Background** = Data cells background
- **Cell Text** = Data cells text color
- **Border** = Table border color
- **Accent Background** = Special rows background
- **Alert Background** = Warning/status background
---
### 📊 Reference Asset Settings
#### **Enable**
- ✅ On = Shows reference asset line
- ❌ Off = Hide reference asset
#### **Symbol**
- Default: `BINANCE:BTCUSDT`
- Can change to any asset:
- `BINANCE:ETHUSDT` (Ethereum)
- `SPX` (S&P 500)
- `DXY` (US Dollar Index)
- Any ticker symbol
#### **Color & Width**
- Customize line appearance
- Width: 1-4 (thickness)
---
## 💡 Trading Strategies
### Strategy 1: CVD Divergence (Beginner-Friendly)
**What to Look For:**
- Price making **higher highs** but CVD making **lower highs** = Bearish divergence
- Price making **lower lows** but CVD making **higher lows** = Bullish divergence
**How to Trade:**
1. Wait for divergence to form
2. Look for confirmation (price reversal, candlestick pattern)
3. Enter trade in divergence direction
4. Stop loss beyond recent high/low
**Example:**
```
Price: /\ /\ /\ (higher highs)
CVD: /\ / \/ (lower highs) = Bearish signal
```
### Strategy 2: CVD Trend Following (Intermediate)
**What to Look For:**
- **Strongly rising CVD** + **rising price** = Strong uptrend
- **Strongly falling CVD** + **falling price** = Strong downtrend
**How to Trade:**
1. Wait for CVD and price moving in same direction
2. Enter on pullbacks to support/resistance
3. Stay in trade while CVD trend continues
4. Exit when CVD trend breaks
**Signals:**
- CVD ▲▲▲ + Price ↑ = Go LONG
- CVD ▼▼▼ + Price ↓ = Go SHORT
### Strategy 3: CVD + Reference Asset (Advanced)
**What to Look For:**
- Your asset **rising** but BTC (reference) **falling** = Relative strength
- Your asset **falling** but BTC (reference) **rising** = Relative weakness
**How to Trade:**
1. Compare CVD movement with BTC
2. If your CVD rises faster than BTC = Buy signal
3. If your CVD falls faster than BTC = Sell signal
4. Use for **pair trading** or **asset selection**
### Strategy 4: Volume Delta Confirmation
**What to Look For:**
- **Large positive Delta** = Strong buying this bar
- **Large negative Delta** = Strong selling this bar
**How to Trade:**
1. Price breaks resistance + Large positive Delta = Confirmed breakout
2. Price breaks support + Large negative Delta = Confirmed breakdown
3. Use Delta to **confirm** price moves, not predict them
**Rules:**
- Delta > 2x average = Very strong pressure
- Delta near zero at key level = Weak move, likely false breakout
---
## 🎓 Reading Real Scenarios
### Scenario 1: Strong Buying Pressure
```
Table Shows:
CVD▲ | 12.5K | ████████ | ████ (CVD rising)
◆DELTA | +2.8K | ████████ | ▲ (Positive delta)
UP↑ | 3.1K | ████████ | ████ (High buy volume)
DN↓ | 0.3K | ██░░░░░░ | ░ (Low sell volume)
◄STATUS► | BULL | ████████ | ████ (Orange background)
```
**Interpretation:** Strong buying, good for LONG trades
### Scenario 2: Distribution (Hidden Selling)
```
Table Shows:
CVD► | 8.2K | ████░░░░ | ▒▒ (CVD flat)
◆DELTA | -1.5K | ████████ | ▼ (Negative delta)
UP↑ | 0.8K | ███░░░░░ | ░ (Low buy volume)
DN↓ | 2.3K | ████████ | ████ (High sell volume)
◄STATUS► | BEAR | ████████ | ░░░░ (Gray background)
```
**Interpretation:** Price may look stable, but selling increasing = Prepare for drop
### Scenario 3: Neutral/Choppy Market
```
Table Shows:
CVD► | 5.1K | ████░░░░ | ▒ (CVD sideways)
◆DELTA | +0.2K | ██░░░░░░ | ─ (Small delta)
UP↑ | 1.2K | ████░░░░ | ▒ (Medium buy)
DN↓ | 1.0K | ████░░░░ | ▒ (Medium sell)
◄STATUS► | NEUT | ████░░░░ | ▒▒ (White background)
```
**Interpretation:** No clear direction = Stay out or reduce position size
---
## ⚠️ Common Mistakes to Avoid
### Mistake 1: Trading on CVD Alone
- ❌ **Wrong:** "CVD is rising, I'll buy immediately"
- ✅ **Right:** "CVD is rising, let me check price structure, support/resistance, and wait for confirmation"
### Mistake 2: Ignoring Delta
- ❌ **Wrong:** Looking only at cumulative CVD
- ✅ **Right:** Watch both CVD (trend) and Delta (momentum)
- Delta shows **immediate** pressure changes
### Mistake 3: Wrong Timeframe
- ❌ **Wrong:** Using 1m chart with High Precision (too slow)
- ✅ **Right:** Match precision to timeframe:
- 1m-5m → Low Precision
- 15m-1h → Medium Precision
- 4h+ → High Precision
### Mistake 4: Not Using Reset
- ❌ **Wrong:** Using "None" reset for intraday trading
- ✅ **Right:** Use "On Higher Timeframe" to see fresh CVD each session
### Mistake 5: Overtrading Neutral Status
- ❌ **Wrong:** Forcing trades when STATUS = NEUT
- ✅ **Right:** Only trade clear BULL or BEAR status
### Mistake 6: Ignoring Reference Asset
- ❌ **Wrong:** Trading altcoin without checking BTC
- ✅ **Right:** Always check if BTC CVD agrees with your asset
---
## 🔥 Pro Tips
### Tip 1: Multi-Timeframe Analysis
- Check CVD on **3 timeframes**:
- Lower TF (15m) = Entry timing
- Current TF (1h) = Trade direction
- Higher TF (4h) = Overall trend
### Tip 2: Volume Confirmation
- Big price move + Small Delta = **Weak move** (likely reversal)
- Small price move + Big Delta = **Strong accumulation** (continuation)
### Tip 3: CVD Reset Zones
- Pay attention to **reset backgrounds** (light gray)
- Often marks **session starts** = High volatility periods
### Tip 4: Divergence + Status
- Bearish divergence + STATUS = BEAR = **Strongest short signal**
- Bullish divergence + STATUS = BULL = **Strongest long signal**
### Tip 5: Color Psychology
- **Orange** (Bullish) is **warm** = Buying energy
- **Gray** (Bearish) is **cool** = Selling pressure
- Train your eye to read colors instantly
### Tip 6: Table as Quick Scan
- Glance at table without reading numbers:
- **All orange** = Bullish
- **All gray** = Bearish
- **Mixed** = Wait
---
## 📱 Quick Reference Card
| Signal | CVD | Delta | Status | Action |
|--------|-----|-------|--------|--------|
| **Strong Buy** | ▲▲ High | ++ Positive | BULL | Long Entry |
| **Strong Sell** | ▼▼ Low | -- Negative | BEAR | Short Entry |
| **Divergence Buy** | ▲ Rising | Price ▼ | → BULL | Long Setup |
| **Divergence Sell** | ▼ Falling | Price ▲ | → BEAR | Short Setup |
| **Neutral** | → Flat | ~0 Near Zero | NEUT | Stay Out |
| **Accumulation** | → Flat | ++ Positive | NEUT→BULL | Watch for Breakout |
| **Distribution** | → Flat | -- Negative | NEUT→BEAR | Watch for Breakdown |
---
## 🆘 Troubleshooting
### Issue: "Indicator not showing"
- **Solution:** Make sure overlay=true in code, re-add to chart
### Issue: "Table overlaps with price"
- **Solution:** Change table position in code or use TradingView's "Move" feature
### Issue: "CVD line too far from price"
- **Solution:** This is normal! CVD is volume-based, not price-based. Focus on CVD direction, not position
### Issue: "Too many lines on chart"
- **Solution:** Disable "Show Zone" and "Show Labels" in settings for cleaner view
### Issue: "Calculations too slow"
- **Solution:** Change Precision to "Low (Fast)" or use higher timeframe
### Issue: "Reference asset not showing"
- **Solution:** Check if "Enable" is ON and symbol is valid (e.g., BINANCE:BTCUSDT)
---
## 🎬 Getting Started Checklist
- Install indicator on TradingView
- Set precision to "Medium"
- Set reset to "On Higher Timeframe"
- Enable info table
- Add reference asset (BTC)
- Practice reading the table on demo account
- Test on different timeframes (15m, 1h, 4h)
- Compare CVD with your current strategy
- Paper trade for 1 week before going live
- Keep a trading journal of CVD signals
---
## 📚 Summary
**CVD shows WHO is winning: Buyers or Sellers**
**Key Points:**
1. **Orange/Rising CVD** = Buying pressure = Bullish
2. **Gray/Falling CVD** = Selling pressure = Bearish
3. **Delta** = Immediate momentum THIS BAR
4. **Status** = Overall market condition
5. **Always confirm** with price action & other indicators
**Remember:**
- CVD is a **tool**, not a crystal ball
- Use with proper risk management
- Practice makes perfect
- Stay disciplined!
---
**Created by: able**
**Version:** iOS Style v1.0
**Contact:** For questions, refer to TradingView community
Happy Trading! 🚀📈
Probabilistic Panel - COMPLETE VERSION📘 Probabilistic Panel — User Manual
________________________________________
INTRODUCTION
The Probabilistic Panel is an advanced TradingView indicator that merges multiple technical-analysis components to provide a probabilistic evaluation of market direction. It is composed of several sections that assess trend, volume, price zones, support and resistance, multiple timeframes, and candle distribution.
________________________________________
PANEL STRUCTURE
1. HEADER
• PROBABILISTIC PANEL: Indicator name.
• FULL VERSION: Indicates that all functionalities are enabled.
________________________________________
2. GENERAL INFORMATION
• ASSET: Displays the asset symbol being analyzed.
• LIMITS: Shows score thresholds for classifying setups (A+, B, C).
________________________________________
3. DIRECTION PROBABILITIES
• PROB: Displays probability of upward movement (upPct) and downward movement (downPct) in percentage.
o Importance: Indicates the direction with the highest probability based on weighted factors.
________________________________________
4. CONTINUATION BIAS
• BIAS: Shows the probability of continuation of the current trend (intrProbCont).
o Importance: Evaluates whether the market is likely to continue in the same direction.
________________________________________
5. MULTI-TIMEFRAME ANALYSIS (MTF)
• MTF: Shows trend direction across multiple timeframes (1D, 1H, 15M, 5M, 1M) using arrows (↑ uptrend, ↓ downtrend, → sideways).
o Importance: Helps identify convergence or divergence between timeframes.
• ALIGNED MTF: Displays the percentage of alignment between timeframes.
o Importance: Higher alignment indicates stronger trends.
________________________________________
6. VOLUME
• VOLUME: Indicates whether volume is “INCREASING”, “DECREASING”, or “STABLE.”
o Importance: Increasing volume confirms trend strength.
________________________________________
7. TECHNICAL INDICATORS
• RSI/ROC: Displays RSI (Relative Strength Index) and ROC (Rate of Change).
o Importance:
RSI > 65 → Overbought
RSI < 35 → Oversold
ROC → Momentum strength indicator
________________________________________
8. PRICE ZONE
• ZONE: Classifies current price as “PREMIUM” (above average), “DISCOUNT” (below average), or “EQUILIBRIUM.”
o Importance: Helps identify buying/selling opportunities based on mean-reversion logic.
________________________________________
9. CANDLE ANALYSIS
• AMPLITUDE: Shows current candle size in percentage and ticks.
o Importance: Candles above minimum amplitude threshold are considered trade-valid.
• FORMATION: Classifies candle as:
o HIGH INDECISION
o TOP REJECTION
o BOTTOM REJECTION
o CONVICTION
o MIXED
o Importance: Reflects market sentiment and psychology.
• WICKS: Displays upper and lower wick size in percentage.
o Importance: Longer wicks suggest rejection or indecision.
• RATIO: Ratio between total wick size and candle body.
o Importance: High ratio = indecision; low ratio = conviction.
________________________________________
10. TRENDS
• AMPLITUDE TREND: Indicates if amplitude is “INCREASING,” “DECREASING,” or “STABLE.”
o Importance: Increasing amplitude may signal rising volatility.
• CONVICTION TREND: Indicates recent candle conviction:
o STRONG UP
o STRONG DOWN
o INDECISIVE
o MIXED
o Importance: Measures the strength of recent candles.
________________________________________
11. PROBABILITY DIFFERENCE (DIF PROB)
• Shows the percentage difference between upward and downward probabilities, classified as:
o EXCELLENT: Very favorable
o GOOD: Significant
o MEDIUM: Moderate (avoid entering)
o MARKET LOSING STRENGTH: Small difference (avoid entering)
o UNSTABLE MARKET: Very small difference (do not trade)
o Importance: Higher difference = more directional clarity.
________________________________________
12. CONFIRMATIONS
• Shows how many consecutive confirmations of the current signal were achieved relative to the configured requirement.
o Importance: More confirmations increase reliability.
________________________________________
13. SCORE & CLASSIFICATION
• SCORE: Final score from 0 to 100, calculated based on multiple factors.
o Higher scores = better setups.
• CLASSIFICATION: Setup categorized as:
o A+ SETUP
o B SETUP
o C SETUP
o DO NOT TRADE
o Importance: Defines whether conditions are favorable.
________________________________________
14. ACTION
• ACTION: Suggests “BUY,” “SELL,” or “WAIT.”
o Importance: Final actionable signal.
________________________________________
DECISION LOGIC
The indicator uses a weighted combination of multiple factors:
1. Trend (wTrend): Based on the price relative to EMA50.
2. Volume (wVol): Based on recent volume vs. its average.
3. Zone (wZona): Based on price position within recent price range.
4. Support/Resistance (wSR): Based on strength of S/R levels.
5. MTF (wMTF): Timeframe alignment.
6. Distribution (wDist): Distribution of bullish, bearish, and neutral candles.
The final score integrates:
• Probability of upward movement
• Continuation bias
• MTF conflict
• Moving-average alignment
• Volume
• Extreme RSI conditions
________________________________________
FALSE-SIGNAL FILTERS
• Close-Only Mode: Updates calculations only on candle close.
• Minimum Candle Size: Ignores very small candles.
• Consecutive Confirmations: Requires repeated signal confirmation.
• Minimum Probability Difference: Enforces a minimum separation between bullish and bearish probabilities.
________________________________________
CONCLUSION
The Probabilistic Panel is a comprehensive tool that integrates multiple technical-analysis dimensions to deliver more reliable trading signals. Parameters must be adjusted according to the asset and timeframe.
Remember: no indicator is infallible.
Always combine it with risk management and additional confirmations.
Pso VP 2.0This indicator provides an advanced volume analysis tool that visualizes trading activity across different price levels and automatically identifies key support and resistance zones.
How It Works:
The Volume Profile analyzes historical price and volume data within a specified lookback period, distributing volume across horizontal price levels. Unlike traditional volume indicators that show volume over time, this tool displays volume at price, revealing where the most significant trading activity has occurred.
The algorithm:
Divides the price range into customizable horizontal bars (bins)
Calculates and accumulates volume for each price level
Identifies high-volume nodes that often act as support or resistance levels
Uses percentile filtering to highlight the most significant trading areas
Key Features:
Automatic S/R Detection: Uses volume percentile filtering to identify the most significant price levels
Dynamic Support/Resistance Lines: Automatically draws horizontal black lines at high-volume areas that typically act as price magnets or barriers
Customizable Parameters: Full control over lookback period, number of price bars, percentile thresholds, profile width, opacity, and line projections
Clean Aesthetic: Monochrome design for professional chart presentation
JokaBAR
This script combines my own liquidity/liq-levels engine with open-source code from BigBeluga’s Volumatic indicators:
• “Volumatic Variable Index Dynamic Average ”
• “Volumatic Support/Resistance Levels ”
The original code is published under the Mozilla Public License 2.0 and is reused here accordingly.
What this script does
Joka puts Volumatic trend logic, dynamic support/resistance and a custom liquidation-levels module into a single overlay. The idea is to give traders one clean view of trend direction, key reactive zones and potential liquidation areas where leveraged positions can be forced out of the market.
Volumatic logic is used to build a dynamic average and adaptive levels that react to volume and volatility. On top of that, the script plots configurable liquidation zones for different leverage tiers (e.g. 5x, 10x, 25x, 50x, 100x).
How to use it
Apply the script on pairs where leverage is actually used (perpetual futures / margin).
Use the Volumatic average as a trend filter (above = long bias, below = short bias).
Treat Volumatic support/resistance levels as key reaction zones for entries, partials and stops.
Read the liquidation levels as context: clusters show where forced liquidations can fuel strong moves and bounces.
Keep the chart clean — this tool is designed to be used without stacking extra indicators on top.
The script is published as open-source in line with TradingView House Rules so that other traders can study, tweak and build on it.
MAGIC MA BANDSMagic MA Bands — Dynamic Trend Zones Instead of Lines
Magic MA Bands help traders visualize dynamic support and resistance zones rather than relying on a single moving average line. Instead of treating the MA as an exact reaction level, this tool creates a band or zone where price is statistically more likely to react, reverse, or continue trending.
🧠 How It Works
The script plots:
Upper Band (default: 50 EMA using High values)
Lower Band (default: 50 EMA using Low values)
Optional Midline MA (default: 200 SMA for long-term trend)
The area between the upper and lower bands becomes a trend cushion, helping traders identify:
Dynamic support/resistance zones
Trend strength and continuation probability
Ideal pullback entry regions
🎯 Trend Interpretation Guide
Use Case Recommended Setting
Short-Term Trend 20/21 EMA or SMA
Medium-Term Trend 50 EMA / SMA
Long-Term Trend 200 SMA / EMA (Midline Optional)
All parameters are fully customisable so the user can define their preferred structure based on their trading style, asset volatility, or timeframe.
✔️ Best For:
Trend traders
Swing trading
Pullback-based entries
Institutional-style zone analysis
Supply and Demand Zones [Clean v6]Supply and Demand Zones
Overview
The Supply and Demand Zones indicator is an automated market structure tool designed to identify high-probability Points of Interest (POI) on any asset or timeframe. Built using Pine Script v6, this script focuses on clarity and performance, providing traders with a clutter-free view of where institutional buying and selling pressure has previously occurred.
Unlike crowded indicators that overwhelm the chart, this script dynamically manages zones—drawing new ones as structure forms and automatically removing invalid zones as price breaks through them.
Key Features
Automated Zone Detection: Automatically identifies Supply (Resistance) and Demand (Support) zones based on Swing Highs and Swing Lows.
Dynamic Zone Management: Active zones extend to the right until price interacts with them.
Break of Structure (BOS) Logic: When price violates a zone (closes beyond the invalidation level), the zone is automatically removed and marked as "Broken" to keep the chart clean.
Zig Zag Structure: Includes an optional Zig Zag overlay to visualize market flow, Higher Highs, and Lower Lows.
ATR-Based Sizing: Zone width is calculated using the Average True Range (ATR), ensuring zones adapt to the asset's current volatility.
Pine Script v6: Optimized using the latest array and method functions for speed and stability.
How It Works
Zone Creation: The script looks for Pivot Highs and Lows based on your defined Swing Length.
Supply Zones (Red): Created at Swing Highs.
Demand Zones (Blue): Created at Swing Lows.
Zone Width: The height of the box is determined by the ATR multiplied by your Zone Width setting. This ensures the zone covers the "wick" area or the volatility range of the pivot.
Invalidation: If the price closes past the outer edge of a zone (the top of a Supply zone or bottom of a Demand zone), the script detects a break, removes the filled box, and leaves a subtle trace of the broken structure.
How to Use
Trend Following: Use the Zig Zag lines to identify the trend direction. Look for Long entries in Demand zones during an uptrend, and Short entries in Supply zones during a downtrend.
Reversals: Watch for price to react at older, unfilled zones (POIs) that align with major support/resistance levels.
Stop Loss Placement: The outer edge of the zone acts as a natural invalidation point. If price closes beyond it, the setup is typically invalidated.
Settings Guide
Swing Length: Determines the sensitivity of the pivot detection. Lower numbers find more local zones (scalping); higher numbers find major structural zones (swing trading).
Max Zones to Keep: Limits the number of historic zones displayed to prevent chart clutter.
Zone Width (ATR): Adjusts how thick the zones are. Increase this value if you want to capture wider wicks.
Visual Settings: Fully customizable colors for Supply, Demand, Borders, and Zig Zag lines.
Disclaimer
This tool is for informational and educational purposes only. It visualizes past price action and does not guarantee future performance. Always manage your risk appropriately.
Automated Intraday Key LevelsThis indicator is designed for day traders who focus on price action and key support/resistance levels. It automates the morning routine of marking up charts by instantly plotting critical levels from the Previous Day, the Premarket Session, and the Current Live Session.
Instead of manually drawing lines every morning, this script dynamically calculates and anchors these levels to the market open, extending them across the trading day for a clean, professional workspace.
Key Features
1. Previous Day Context (Static - White Lines) Before the market opens, it is crucial to know where price closed and traded yesterday.
Prev High & Low: Major support/resistance boundaries.
Prev Close: A magnetic level often used for "Gap Fill" strategies.
Prev Open: Provides context on yesterday's directional sentiment.
2. Premarket Session (Static - Orange Lines) The script fetches data from the Extended Trading Hours session (04:00 – 09:30 EST) to identify the overnight range.
PM High & Low: A breakout above the PM High or breakdown below the PM Low often signals the start of a trend day.
PM Midpoint (Dashed): Represents the overnight equilibrium. Staying above this level indicates early bullish strength.
3. Current Day Stats (Dynamic - Blue Lines) Once the Regular Trading Hours (RTH) begin, the script tracks live price action.
Day High (HOD) & Low (LOD): These lines update in real-time as price pushes new extremes. They are thicker to denote their importance as immediate liquidity zones.
Day Midpoint (Dashed): Calculated as (High + Low) / 2. This is a dynamic trend filter; price holding above the daily midpoint suggests buyers are in control, while trading below suggests seller dominance.
Visual Guide
To keep the chart clean and readable, the levels are color-coded:
🟦 Solid Blue (Width 2): Current Day High / Low (The most active levels).
🟦 Dashed Blue: Current Day Midpoint (50% Retracement level).
🟧 Solid Orange: Premarket High / Low.
🟧 Dashed Orange: Premarket Midpoint.
⬜ Solid White: Previous Day Open, High, Low, Close.
All lines are anchored to the 09:30 EST start time to keep the pre-market area of your chart uncluttered.
Session Breaker with Pivots and VWAP (Arjo)Session Breaker with Pivots and VWAP : A complete intraday trading toolkit in one clean indicator.
This indicator combines four powerful tools that help traders understand intraday bias with clarity and confidence.
It plots the previous day’s last 30-minute high/low box (IST: 15:00–15:30) , the first-hour anchored VWAP (IST: 09:15–10:15) , daily pivot levels , and ATR-based dynamic support/resistance .
Key Features:
• Custom Session High & Low (default 30-min opening range or any session you choose)
→ Visual colored box that instantly changes color when price breaks above the high (cyan) or below the low (purple)
→ The separate darker box shows the exact opening-range boundaries
• Previous Day Classic Pivot Points (PP, BC, TC) + previous session midpoint
→ Clean horizontal lines that auto-update every day
• Morning Session VWAP (default 09:15–10:15 or fully customizable)
→ Perfect reference for early trend strength
• Dynamic Support & Resistance channel based on 20 EMA ± 1×ATR
→ Shaded zones for quick visual context
How to use this tool
//---------------Morning behavior----------------------------
Scenario 1: Opening above previous 30-min high + above 1-hr VWAP
# Institutions were buying heavily in the last 30 minutes yesterday
# Fresh buying continues today above VWAP.
→ Strong bullish continuation day
Scenario 2: Opening inside yesterday's last 30 Mins range + rejecting 1-hr VWAP
# Price keeps oscillating around the first-hour VWAP
No strong buying/selling pressure
→ Expect sideways mean reversion
Scenario 3: Opening below yesterday's last 30-min low but reclaiming 1-hr VWAP.
Then moves towards yesterday’s midpoint or even high.
# Overnight panic selling is absorbed by institutions, then the market reverses. This is a high-probability reversal.
→ Short-covering rally
Scenario 4: Gap up into yesterday's last 30 Mins high and failing 1-hour VWAP
→ Ideal countertrend short.
Scenario 5: Opening below yesterday's last 30-minute low + below 1-hour VWAP
# Aggressive selling
# Staying below VWAP = no buyer strength
#Institutions are selling rallies into VWAP
→ Strong bearish continuation day
In Short:
1. Price opens ABOVE previous 30-min HIGH + stays ABOVE VWAP → TREND DAY UP
2. Price opens INSIDE the previous 30-min range + hovers around VWAP → RANGE / MEAN REVERSION DAY
3. Price opens BELOW previous 30-min LOW + reclaims VWAP → REVERSAL DAY UP (Short-Covering or Short Trap)
4. Gap up opens ABOVE previous 30-min HIGH + failing 1-hr VWAP → Countertrend short.
5. Price opens BELOW previous 30-min LOW + stays BELOW VWAP → TREND DAY DOWN
Disclaimer
This indicator is an analytical and educational tool . It does not provide buy/sell signals. Users may combine these concepts with their own trading approach and risk management.
Happy trading, ARJO.
Swing High-Low Line ConnectorSwing High-Low Line Connector is a simple and intuitive tool that automatically detects swing highs and swing lows using fractal-style pivot logic and connects them with clean, continuous lines. This indicator helps traders visualize market structure, trend shifts, and swing-based support/resistance levels at a glance.
The script identifies each confirmed swing point based on a user-defined lookback window (left/right bars). When a new swing is confirmed, the indicator updates the previous leg or creates a new one, effectively drawing the classic “zigzag-style” connections used in discretionary trading and price-action analysis.
A dynamic tail extension is included to show the most recent swing extending toward the current price. By default, the tail follows a ZigZag-style logic—extending upward after a swing low and downward after a swing high—but users can also anchor it to Close, High, Low, or HL2.
Features
Automatic detection of swing highs and swing lows
Clean line connections between swings (similar to discretionary market-structure mapping)
Proper consolidation handling: weaker highs/lows are ignored
Optional ZigZag-style dynamic tail extension
Fully customizable lookback window, line color, and line width
Works on any market and timeframe
Use Cases
Identifying market structure (HH, HL, LH, LL)
Visualizing trend transitions
Spotting breakout levels and swing-based support/resistance
Aiding discretionary swing trading, trend following, or pattern recognition
This indicator keeps the logic simple and visual—ideal for traders who prefer clean chart structure without unnecessary noise.
Day Trading Signals - Ultimate Pro (Dark Neon + Strong BB Cloud)//@version=5
indicator("Day Trading Signals - Ultimate Pro (Dark Neon + Strong BB Cloud)", overlay=true, max_lines_count=500, max_labels_count=500)
// ===== INPUTS =====
ema_fast_len = input.int(9, "Fast EMA Length")
ema_slow_len = input.int(21, "Slow EMA Length")
rsi_len = input.int(12, "RSI Length")
rsi_overbought = input.int(70, "RSI Overbought Level")
rsi_oversold = input.int(30, "RSI Oversold Level")
bb_len = input.int(20, "Bollinger Bands Length")
bb_mult = input.float(2.0, "Bollinger Bands Multiplier")
sr_len = input.int(15, "Pivot Lookback for Support/Resistance")
min_ema_gap = input.float(0.0, "Minimum EMA Gap to Define Trend", step=0.1)
sr_lifespan = input.int(200, "Bars to Keep S/R Lines")
// Display options
show_bb = input.bool(true, "Show Bollinger Bands?")
show_ema = input.bool(true, "Show EMA Lines?")
show_sr = input.bool(true, "Show Support/Resistance Lines?")
show_bg = input.bool(true, "Show Background Trend Color?")
// ===== COLORS (Dark Neon Theme) =====
neon_teal = color.rgb(0, 255, 200)
neon_purple = color.rgb(180, 95, 255)
neon_orange = color.rgb(255, 160, 60)
neon_yellow = color.rgb(255, 235, 90)
neon_red = color.rgb(255, 70, 110)
neon_gray = color.rgb(140, 140, 160)
sr_support_col = color.rgb(0, 190, 140)
sr_resist_col = color.rgb(255, 90, 120)
// ===== INDICATORS =====
ema_fast = ta.ema(close, ema_fast_len)
ema_slow = ta.ema(close, ema_slow_len)
ema_gap = math.abs(ema_fast - ema_slow)
trend_up = (ema_fast > ema_slow) and (ema_gap > min_ema_gap)
trend_down = (ema_fast < ema_slow) and (ema_gap > min_ema_gap)
trend_flat = ema_gap <= min_ema_gap
rsi = ta.rsi(close, rsi_len)
bb_mid = ta.sma(close, bb_len)
bb_upper = bb_mid + bb_mult * ta.stdev(close, bb_len)
bb_lower = bb_mid - bb_mult * ta.stdev(close, bb_len)
// ===== SUPPORT / RESISTANCE =====
pivot_high = ta.pivothigh(high, sr_len, sr_len)
pivot_low = ta.pivotlow(low, sr_len, sr_len)
var line sup_lines = array.new_line()
var line res_lines = array.new_line()
if show_sr and not na(pivot_low)
l = line.new(bar_index - sr_len, pivot_low, bar_index, pivot_low, color=sr_support_col, width=2, extend=extend.right)
array.push(sup_lines, l)
if show_sr and not na(pivot_high)
l = line.new(bar_index - sr_len, pivot_high, bar_index, pivot_high, color=sr_resist_col, width=2, extend=extend.right)
array.push(res_lines, l)
// Delete old S/R lines
if array.size(sup_lines) > 0
for i = 0 to array.size(sup_lines) - 1
l = array.get(sup_lines, i)
if bar_index - line.get_x2(l) > sr_lifespan
line.delete(l)
array.remove(sup_lines, i)
break
if array.size(res_lines) > 0
for i = 0 to array.size(res_lines) - 1
l = array.get(res_lines, i)
if bar_index - line.get_x2(l) > sr_lifespan
line.delete(l)
array.remove(res_lines, i)
break
// ===== BUY / SELL CONDITIONS =====
buy_cond = trend_up and not trend_flat and ta.crossover(ema_fast, ema_slow) and rsi < rsi_oversold and close < bb_lower
sell_cond = trend_down and not trend_flat and ta.crossunder(ema_fast, ema_slow) and rsi > rsi_overbought and close > bb_upper
// ===== SIGNAL PLOTS =====
plotshape(buy_cond, title="Buy Signal", location=location.belowbar, color=neon_teal, style=shape.labelup, text="BUY", size=size.small)
plotshape(sell_cond, title="Sell Signal", location=location.abovebar, color=neon_red, style=shape.labeldown, text="SELL", size=size.small)
// ===== EMA LINES =====
plot(show_ema ? ema_fast : na, color=neon_orange, title="EMA Fast", linewidth=2)
plot(show_ema ? ema_slow : na, color=neon_purple, title="EMA Slow", linewidth=2)
// ===== STRONG BOLLINGER BAND CLOUD =====
plot_bb_upper = plot(show_bb ? bb_upper : na, color=color.new(neon_yellow, 20), title="BB Upper")
plot_bb_lower = plot(show_bb ? bb_lower : na, color=color.new(neon_gray, 20), title="BB Lower")
plot(bb_mid, color=color.new(neon_gray, 50), title="BB Mid")
// More visible BB cloud (stronger contrast)
bb_cloud_color = trend_up ? color.new(neon_teal, 40) : trend_down ? color.new(neon_red, 40) : color.new(neon_gray, 70)
fill(plot_bb_upper, plot_bb_lower, color=show_bb ? bb_cloud_color : na, title="BB Cloud")
// ===== BACKGROUND COLOR (TREND ZONES) =====
bgcolor(show_bg ? (trend_up ? color.new(neon_teal, 92) : trend_down ? color.new(neon_red, 92) : color.new(neon_gray, 94)) : na)
// ===== ALERTS =====
alertcondition(buy_cond, title="Buy Signal", message="Buy signal triggered. Check chart.")
alertcondition(sell_cond, title="Sell Signal", message="Sell signal triggered. Check chart.")
Day Trading Signals - Ultimate Pro (Dark Neon + Strong BB Cloud)//@version=5
indicator("Day Trading Signals - Ultimate Pro (Dark Neon + Strong BB Cloud)", overlay=true, max_lines_count=500, max_labels_count=500)
// ===== INPUTS =====
ema_fast_len = input.int(9, "Fast EMA Length")
ema_slow_len = input.int(21, "Slow EMA Length")
rsi_len = input.int(12, "RSI Length")
rsi_overbought = input.int(70, "RSI Overbought Level")
rsi_oversold = input.int(30, "RSI Oversold Level")
bb_len = input.int(20, "Bollinger Bands Length")
bb_mult = input.float(2.0, "Bollinger Bands Multiplier")
sr_len = input.int(15, "Pivot Lookback for Support/Resistance")
min_ema_gap = input.float(0.0, "Minimum EMA Gap to Define Trend", step=0.1)
sr_lifespan = input.int(200, "Bars to Keep S/R Lines")
// Display options
show_bb = input.bool(true, "Show Bollinger Bands?")
show_ema = input.bool(true, "Show EMA Lines?")
show_sr = input.bool(true, "Show Support/Resistance Lines?")
show_bg = input.bool(true, "Show Background Trend Color?")
// ===== COLORS (Dark Neon Theme) =====
neon_teal = color.rgb(0, 255, 200)
neon_purple = color.rgb(180, 95, 255)
neon_orange = color.rgb(255, 160, 60)
neon_yellow = color.rgb(255, 235, 90)
neon_red = color.rgb(255, 70, 110)
neon_gray = color.rgb(140, 140, 160)
sr_support_col = color.rgb(0, 190, 140)
sr_resist_col = color.rgb(255, 90, 120)
// ===== INDICATORS =====
ema_fast = ta.ema(close, ema_fast_len)
ema_slow = ta.ema(close, ema_slow_len)
ema_gap = math.abs(ema_fast - ema_slow)
trend_up = (ema_fast > ema_slow) and (ema_gap > min_ema_gap)
trend_down = (ema_fast < ema_slow) and (ema_gap > min_ema_gap)
trend_flat = ema_gap <= min_ema_gap
rsi = ta.rsi(close, rsi_len)
bb_mid = ta.sma(close, bb_len)
bb_upper = bb_mid + bb_mult * ta.stdev(close, bb_len)
bb_lower = bb_mid - bb_mult * ta.stdev(close, bb_len)
// ===== SUPPORT / RESISTANCE =====
pivot_high = ta.pivothigh(high, sr_len, sr_len)
pivot_low = ta.pivotlow(low, sr_len, sr_len)
var line sup_lines = array.new_line()
var line res_lines = array.new_line()
if show_sr and not na(pivot_low)
l = line.new(bar_index - sr_len, pivot_low, bar_index, pivot_low, color=sr_support_col, width=2, extend=extend.right)
array.push(sup_lines, l)
if show_sr and not na(pivot_high)
l = line.new(bar_index - sr_len, pivot_high, bar_index, pivot_high, color=sr_resist_col, width=2, extend=extend.right)
array.push(res_lines, l)
// Delete old S/R lines
if array.size(sup_lines) > 0
for i = 0 to array.size(sup_lines) - 1
l = array.get(sup_lines, i)
if bar_index - line.get_x2(l) > sr_lifespan
line.delete(l)
array.remove(sup_lines, i)
break
if array.size(res_lines) > 0
for i = 0 to array.size(res_lines) - 1
l = array.get(res_lines, i)
if bar_index - line.get_x2(l) > sr_lifespan
line.delete(l)
array.remove(res_lines, i)
break
// ===== BUY / SELL CONDITIONS =====
buy_cond = trend_up and not trend_flat and ta.crossover(ema_fast, ema_slow) and rsi < rsi_oversold and close < bb_lower
sell_cond = trend_down and not trend_flat and ta.crossunder(ema_fast, ema_slow) and rsi > rsi_overbought and close > bb_upper
// ===== SIGNAL PLOTS =====
plotshape(buy_cond, title="Buy Signal", location=location.belowbar, color=neon_teal, style=shape.labelup, text="BUY", size=size.small)
plotshape(sell_cond, title="Sell Signal", location=location.abovebar, color=neon_red, style=shape.labeldown, text="SELL", size=size.small)
// ===== EMA LINES =====
plot(show_ema ? ema_fast : na, color=neon_orange, title="EMA Fast", linewidth=2)
plot(show_ema ? ema_slow : na, color=neon_purple, title="EMA Slow", linewidth=2)
// ===== STRONG BOLLINGER BAND CLOUD =====
plot_bb_upper = plot(show_bb ? bb_upper : na, color=color.new(neon_yellow, 20), title="BB Upper")
plot_bb_lower = plot(show_bb ? bb_lower : na, color=color.new(neon_gray, 20), title="BB Lower")
plot(bb_mid, color=color.new(neon_gray, 50), title="BB Mid")
// More visible BB cloud (stronger contrast)
bb_cloud_color = trend_up ? color.new(neon_teal, 40) : trend_down ? color.new(neon_red, 40) : color.new(neon_gray, 70)
fill(plot_bb_upper, plot_bb_lower, color=show_bb ? bb_cloud_color : na, title="BB Cloud")
// ===== BACKGROUND COLOR (TREND ZONES) =====
bgcolor(show_bg ? (trend_up ? color.new(neon_teal, 92) : trend_down ? color.new(neon_red, 92) : color.new(neon_gray, 94)) : na)
// ===== ALERTS =====
alertcondition(buy_cond, title="Buy Signal", message="Buy signal triggered. Check chart.")
alertcondition(sell_cond, title="Sell Signal", message="Sell signal triggered. Check chart.")
Day Trading Signals - Ultimate Pro (Dark Neon + Strong BB Cloud)//@version=5
indicator("Day Trading Signals - Ultimate Pro (Dark Neon + Strong BB Cloud)", overlay=true, max_lines_count=500, max_labels_count=500)
// ===== INPUTS =====
ema_fast_len = input.int(9, "Fast EMA Length")
ema_slow_len = input.int(21, "Slow EMA Length")
rsi_len = input.int(12, "RSI Length")
rsi_overbought = input.int(70, "RSI Overbought Level")
rsi_oversold = input.int(30, "RSI Oversold Level")
bb_len = input.int(20, "Bollinger Bands Length")
bb_mult = input.float(2.0, "Bollinger Bands Multiplier")
sr_len = input.int(15, "Pivot Lookback for Support/Resistance")
min_ema_gap = input.float(0.0, "Minimum EMA Gap to Define Trend", step=0.1)
sr_lifespan = input.int(200, "Bars to Keep S/R Lines")
// Display options
show_bb = input.bool(true, "Show Bollinger Bands?")
show_ema = input.bool(true, "Show EMA Lines?")
show_sr = input.bool(true, "Show Support/Resistance Lines?")
show_bg = input.bool(true, "Show Background Trend Color?")
// ===== COLORS (Dark Neon Theme) =====
neon_teal = color.rgb(0, 255, 200)
neon_purple = color.rgb(180, 95, 255)
neon_orange = color.rgb(255, 160, 60)
neon_yellow = color.rgb(255, 235, 90)
neon_red = color.rgb(255, 70, 110)
neon_gray = color.rgb(140, 140, 160)
sr_support_col = color.rgb(0, 190, 140)
sr_resist_col = color.rgb(255, 90, 120)
// ===== INDICATORS =====
ema_fast = ta.ema(close, ema_fast_len)
ema_slow = ta.ema(close, ema_slow_len)
ema_gap = math.abs(ema_fast - ema_slow)
trend_up = (ema_fast > ema_slow) and (ema_gap > min_ema_gap)
trend_down = (ema_fast < ema_slow) and (ema_gap > min_ema_gap)
trend_flat = ema_gap <= min_ema_gap
rsi = ta.rsi(close, rsi_len)
bb_mid = ta.sma(close, bb_len)
bb_upper = bb_mid + bb_mult * ta.stdev(close, bb_len)
bb_lower = bb_mid - bb_mult * ta.stdev(close, bb_len)
// ===== SUPPORT / RESISTANCE =====
pivot_high = ta.pivothigh(high, sr_len, sr_len)
pivot_low = ta.pivotlow(low, sr_len, sr_len)
var line sup_lines = array.new_line()
var line res_lines = array.new_line()
if show_sr and not na(pivot_low)
l = line.new(bar_index - sr_len, pivot_low, bar_index, pivot_low, color=sr_support_col, width=2, extend=extend.right)
array.push(sup_lines, l)
if show_sr and not na(pivot_high)
l = line.new(bar_index - sr_len, pivot_high, bar_index, pivot_high, color=sr_resist_col, width=2, extend=extend.right)
array.push(res_lines, l)
// Delete old S/R lines
if array.size(sup_lines) > 0
for i = 0 to array.size(sup_lines) - 1
l = array.get(sup_lines, i)
if bar_index - line.get_x2(l) > sr_lifespan
line.delete(l)
array.remove(sup_lines, i)
break
if array.size(res_lines) > 0
for i = 0 to array.size(res_lines) - 1
l = array.get(res_lines, i)
if bar_index - line.get_x2(l) > sr_lifespan
line.delete(l)
array.remove(res_lines, i)
break
// ===== BUY / SELL CONDITIONS =====
buy_cond = trend_up and not trend_flat and ta.crossover(ema_fast, ema_slow) and rsi < rsi_oversold and close < bb_lower
sell_cond = trend_down and not trend_flat and ta.crossunder(ema_fast, ema_slow) and rsi > rsi_overbought and close > bb_upper
// ===== SIGNAL PLOTS =====
plotshape(buy_cond, title="Buy Signal", location=location.belowbar, color=neon_teal, style=shape.labelup, text="BUY", size=size.small)
plotshape(sell_cond, title="Sell Signal", location=location.abovebar, color=neon_red, style=shape.labeldown, text="SELL", size=size.small)
// ===== EMA LINES =====
plot(show_ema ? ema_fast : na, color=neon_orange, title="EMA Fast", linewidth=2)
plot(show_ema ? ema_slow : na, color=neon_purple, title="EMA Slow", linewidth=2)
// ===== STRONG BOLLINGER BAND CLOUD =====
plot_bb_upper = plot(show_bb ? bb_upper : na, color=color.new(neon_yellow, 20), title="BB Upper")
plot_bb_lower = plot(show_bb ? bb_lower : na, color=color.new(neon_gray, 20), title="BB Lower")
plot(bb_mid, color=color.new(neon_gray, 50), title="BB Mid")
// More visible BB cloud (stronger contrast)
bb_cloud_color = trend_up ? color.new(neon_teal, 40) : trend_down ? color.new(neon_red, 40) : color.new(neon_gray, 70)
fill(plot_bb_upper, plot_bb_lower, color=show_bb ? bb_cloud_color : na, title="BB Cloud")
// ===== BACKGROUND COLOR (TREND ZONES) =====
bgcolor(show_bg ? (trend_up ? color.new(neon_teal, 92) : trend_down ? color.new(neon_red, 92) : color.new(neon_gray, 94)) : na)
// ===== ALERTS =====
alertcondition(buy_cond, title="Buy Signal", message="Buy signal triggered. Check chart.")
alertcondition(sell_cond, title="Sell Signal", message="Sell signal triggered. Check chart.")






















